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

From: Herbert Xu (herbert_at_gondor.apana.org.au)
Date: 05/24/05

  • Next message: Karim Yaghmour: "Re: ide-cd vs. DMA"
    Date:	Tue, 24 May 2005 13:47:44 +1000
    To: "David S. Miller" <davem@davemloft.net>
    
    

    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~} <herbert@gondor.apana.org.au>
    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 majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Karim Yaghmour: "Re: ide-cd vs. DMA"

    Relevant Pages

    • Re: KMDF DPC Synchronization
      ... you have to garuntee that no spin lock ever gets double acquired even by ... we aren't in Win32 land anymore! ... "Pavel A." ... But better try not to acquire locks recursively. ...
      (microsoft.public.development.device.drivers)
    • Re: I request inclusion of SAS Transport Layer and AIC-94xx into the kernel
      ... >> User space locking can only guarantee atomic operations in user space. ... > Sorry but I completely fail to see this argument., locks it, then hangs. ... Process A opens an attribute and writes to it. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: robust futex deadlock detection patch
      ... locks across the check for deadlocks and into __down_interruptible. ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • Re: nforce2 lockups
      ... > (if not counting unability to enabe SiI SATA DMA mode with attached ... Usually it locks up a lot ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: 2.6.13-rc3-mm3
      ... >> That number rapidly increases and so it looks like something is failing ... This locks the system up after the "INIT: ... the system proceeds past INIT and boots normally but X still locks up... ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)