#25122: geoip: Hook the client geoip cache into the OOM handler
 Reporter:  dgoulet                              |          Owner:  dgoulet
     Type:  enhancement                          |         Status:
                                                 |  needs_review
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.3.3.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  tor-relay, tor-oom, tor-dos,         |  Actual Points:
  029-backport, 031-backport, 032-backport       |
Parent ID:                                       |         Points:
 Reviewer:                                       |        Sponsor:

Comment (by dgoulet):

 Replying to [comment:2 nickm]:
 > I'm guessing that clientmap_entry_size() is something we'd extend once
 we have this and #24902 merged to the same branch?

 Don't think so because the added stuff in a `clientmap_entry_t` in #24902
 are not allocated so the `sizeof()` will pick them up.

 > The geoip_client_cache_total_allocation() function needs to be much
 faster -- otherwise it will eat tons of CPU by walking the whole map every
 time cell_queues_check_size() is called -- and it is called from inside
 append_cell_to_circuit_queue().  How about having a static size_t that we
 increment when we allocate an entry, and decrement when we free it?

 Ah right, indeed. What about this fixup commit: `64e595e07c42a6f4` ?

Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25122#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
tor-bugs mailing list

Reply via email to