Dan McDonald wrote:

If we call EF with pure synchronous calls, however, we may block a long time,
and that would be theoretically be BAD for IP input processing.  No locks are
held, IIRC, during the part of ip_input() that calls IPsec, and no locks are
held in IPsec during the crypto-dispatch routines.

So here's the $1M questions: Can I call a blocking function from ip_input()
if no locks are being held?  (And at worse, I'm only reference-holding
objects?)

Blocking for a potentially unbounded amount of time is clearly a no-no.

But I fundamentally don't see a difference between code runs a software algorithm for 100 microseconds and code which passes the work to hardware and then cv_waits until the hardware is done, and the hardware is guaranteed to finish in 100 microseconds or less.

One could argue that on platforms with lots of CPUs/cores that is is better farming off a separate thread, but in that case even the software case algorithm should spawn off a thread.

   Erik
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to