mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: "David S. Miller" <davem@davemloft.net>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org,
	linux-crypto@vger.kernel.org, jmorris@redhat.com
Subject: Re: [CRYPTO]: Only reschedule if !in_atomic()
Date: Tue, 24 May 2005 13:47:44 +1000	[thread overview]
Message-ID: <20050524034744.GA29699@gondor.apana.org.au> (raw)
In-Reply-To: <20050523.193612.08320356.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

  parent reply	other threads:[~2005-05-24  3:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200505232300.j4NN07lE012726@hera.kernel.org>
2005-05-23 23:28 ` Andrew Morton
2005-05-23 23:58   ` Benjamin Herrenschmidt
2005-05-24  0:24     ` Andrew Morton
2005-05-24  2:21   ` Herbert Xu
2005-05-24  2:31     ` Andrew Morton
2005-05-24  2:43       ` Herbert Xu
2005-05-24  3:20         ` James Morris
2005-05-24  3:50           ` Herbert Xu
2005-05-24 13:32       ` Bill Davidsen
     [not found]     ` <20050523.193612.08320356.davem@davemloft.net>
2005-05-24  3:47       ` Herbert Xu [this message]
2005-05-24  6:40 ` Arjan van de Ven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050524034744.GA29699@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=akpm@osdl.org \
    --cc=davem@davemloft.net \
    --cc=jmorris@redhat.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®