[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #8273 [Tor]: Set flag thresholds and flags based on measured bandwidth
#8273: Set flag thresholds and flags based on measured bandwidth
----------------------+-----------------------------------------------------
 Reporter:  nickm     |          Owner:                    
     Type:  defect    |         Status:  needs_review      
 Priority:  critical  |      Milestone:  Tor: 0.2.4.x-final
Component:  Tor       |        Version:                    
 Keywords:  tor-auth  |         Parent:                    
   Points:            |   Actualpoints:                    
----------------------+-----------------------------------------------------
Changes (by andrea):
  * status:  needs_revision => needs_review
Comment:
 Replying to [comment:2 nickm]:
 > Quick notes:
 >   * The "/* Check if we cleared the whole thing and free if so */" seems
 unnecessary.  dirserv_clear_measured_bw_cache will free this eventually,
 right?
 It saves one extra block of memory for the map itself when it's empty.
 >   * In case time is unsigned, the expiry check should be something like
 "e->as_of < now - MX_MEASUREMENT_TIME". This might also help the compiler
 raise the computation. (Not that it matters.)
 Done.
 >   * We should be calling dirserv_clear_measured_bw_cache from
 dirserv_free_all.
 Done.
 >   * Would DIGESTMAP_FOREACH_MODIFY and DIGESTMAP_FOREACH_MODIFY_END make
 the expiry function easier to write?
 Done.
 >   * The node_id argument for dirserv_query_measured_bw_cache should
 probably be const.  The documentation for that function should explain
 what the return value means, and what exactly happens to the *_out
 variables.
 Done.
 >   * dirserv_get_bandwidth_for_router should take a const routerinfo
 Done.
 >   * I think dirserv_cache_measured_bw should take a const parsed_line.
 Done.
 > And an issue of medium trickiness:
 >   * It would be cool to have some unit tests for the new machinery here.
 Done; not really that tricky.
 > And a trickier issue:
 >   * When we have a sufficient number/fraction of nodes with measured
 bandwidth, I think we should stop believing nodes' advertised bandwidths.
 That is, if the number/fraction of measured nodes is high enough, then we
 should *never* call unmeasured nodes Fast, or Guard, or HSDir, or anything
 else that depends on bandwidth.  (Plausible?)
 That sounds like a good idea potentially; what about other circumstances
 we use the advertised bandwidth?  Should we consider those cases or just
 concern ourselves with the flags?
-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/8273#comment:14>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs