Re: [CRYPTO]: Only reschedule if !in_atomic()

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

 



On Mon, May 23, 2005 at 07:36:12PM -0700, David S. Miller wrote:
> 
> See how ugly this stuff gets once you start letting some people call
> this stuff with locks and some not?

But we already do that anyway.  For example, IPsec calls the crypto
functions with a spin lock on the xfrm_state.  As it is, you're
allowed to call crypto functions while holding spin locks if and
only if you're in softirq context.

Incidentally, that is something I intend on changing.  There is no
reason why we can't do away with that spin lock on the fast path
for IPsec.

> Crypto operations, especially the software operations, are extremely
> expensive compute bound tasks.  It is very desirable, as a result, for
> them to be allowed to relinquish the cpu from time to time.

Agreed.

> That being said, I guess a flag isn't so bad.

The other thing we could do with a flag is to use it to set GFP
flags for memory allocation.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux