Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src



Mindaugas,

Thanks for your comments.

On Fri, Apr 11, 2008 at 11:41:04AM +0100, Mindaugas Rasiukevicius wrote:
>
> - Why crypto_mtx is not set to IPL_SOFTNET, but IPL_NET?

It replaced calls to "splcrypto()", which was splnet().  The actual
hardware drivers currently in the tree all use splnet() for mutual
exclusion and there are a couple of cases where driver done routines
can need the crypto_mtx -- so I think it probably has to be at IPL_NET,
no?

> - It is not good to allocate the memory, while lock (especially spin-lock)
>   is held (eg. in csecreate).

I thought it was acceptable to use pool with PR_NOWAIT with a lock held,
since it allocates or immediately returns.  The code has been this way
for months -- it's not OK?

Calling the cse functions without the mutex held would mean a fairly extensive
restructuring of some of the code, or a lot of taking and dropping of the
mutex, which as I understand it is expensive.  I can try to do that, though,
if the consensus is that I should.

As you suggested I've removed the error checking on KM_SLEEP / PR_WAITOK
allocations.

-- 
  Thor Lancelot Simon                                        
tls%rek.tjls.com@localhost

  "The inconsistency is startling, though admittedly, if consistency is to
   be abandoned or transcended, there is no problem."         - Noam Chomsky


Home | Main Index | Thread Index | Old Index