mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Fruhwirth Clemens <clemens@endorphin.org>
Cc: jmorris@redhat.com, linux-kernel@vger.kernel.org,
	michal@logix.cz, davem@davemloft.net, adam@yggdrasil.com
Subject: Re: [PATCH 01/04] Adding cipher mode context information to crypto_tfm
Date: Thu, 10 Feb 2005 02:33:44 -0800	[thread overview]
Message-ID: <20050210023344.390fb358.akpm@osdl.org> (raw)
In-Reply-To: <1108028923.14335.44.camel@ghanima>

Fruhwirth Clemens <clemens@endorphin.org> wrote:
>
> On Wed, 2005-02-09 at 17:19 -0800, Andrew Morton wrote:
> > Fruhwirth Clemens <clemens@endorphin.org> wrote:
> > >
> > > It must be
> > >  possible to process more than 2 mappings in softirq context.
> > 
> > Adding a few more fixmap slots wouldn't hurt anyone.  But if you want an
> > arbitrarily large number of them then no, we cannot do that.
> 
> What magnitude is "few more"? 2, 10, 100?

Not 100.  10 would seem excessive.

> > Taking more than one sleeping kmap at a time within the same process is
> > deadlocky, btw.  You can end up with N such tasks all holding one kmap and
> > waiting for someone else to release one.
> > 
> > Possibly one could arrange for the pages to not be in highmem at all.
> 
> Is there an easy way to bring pages to lowmem? The cryptoapi is called
> from the backlog of the networking stack, which is assigned in irq
> context first and processed softirq context.

Are networking frames ever allocated from highmem?  Don't think so.

> There is little opportunity
> to bringt stuff to low mem. And we can't bringt stuff to lowmem on our
> own as well, because (as I guess) this involves a page allocation, which
> would have to be GFP_ATOMIC, which can fail. So we would need fallback
> for the fallback mechanism, and that's still the tiny set of scratch
> buffers.. hairy business..

yup.

> Ok, what about the following plan:
> 
> If context == softirq, use kmap_atomic until they all used, fall-back to
> scratch buffers, and printk in some DEBUG mode:"Warning slow, redesign
> your client or raise the number of fixmaps".

Sounds painful.

> If context == user, use kmap_atomic until they all used, and fall-back
> to kmap.

Taking multiple kmaps can deadlock due to kmap exhaustion though.

  reply	other threads:[~2005-02-10 10:34 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-24 11:56 Fruhwirth Clemens
2005-01-24 12:31 ` James Morris
2005-01-24 22:31 ` Andrew Morton
2005-01-24 23:12   ` Fruhwirth Clemens
2005-01-25 15:52   ` James Morris
2005-01-25 17:38     ` Fruhwirth Clemens
2005-01-25 18:56       ` James Morris
2005-01-29 18:13     ` Fruhwirth Clemens
2005-01-29 18:23       ` Andrew Morton
2005-01-30 18:07         ` Fruhwirth Clemens
2005-02-02 22:46           ` James Morris
2005-02-02 23:28             ` Fruhwirth Clemens
2005-02-02 23:34               ` David S. Miller
2005-02-03  0:21                 ` Fruhwirth Clemens
2005-02-03  0:29                   ` David S. Miller
2005-02-03  0:40                   ` Michal Ludvig
2005-02-03  8:55                     ` Fruhwirth Clemens
2005-02-02 23:46               ` James Morris
2005-02-02 23:47                 ` James Morris
2005-02-03 11:47             ` Fruhwirth Clemens
2005-02-08 14:14               ` James Morris
2005-02-05  9:23             ` Fruhwirth Clemens
2005-02-08 14:48               ` James Morris
2005-02-08 16:08                 ` Fruhwirth Clemens
2005-02-08 16:39                   ` Fruhwirth Clemens
2005-02-08 23:30                     ` James Morris
2005-02-08 23:53                       ` Fruhwirth Clemens
2005-02-09  0:09                         ` James Morris
2005-02-09  9:14                           ` Fruhwirth Clemens
2005-02-10  0:30                             ` James Morris
2005-02-10  1:02                               ` Fruhwirth Clemens
2005-02-10  1:19                                 ` Andrew Morton
2005-02-10  1:37                                   ` Christophe Saout
2005-02-10  9:48                                   ` Fruhwirth Clemens
2005-02-10 10:33                                     ` Andrew Morton [this message]
2005-02-10 11:17                                       ` Fruhwirth Clemens
2005-02-10 17:02                                         ` James Morris
2005-02-10 17:29                                           ` Fruhwirth Clemens
2005-02-10 17:54                                             ` James Morris
2005-02-14 13:20                                               ` Fruhwirth Clemens
2005-02-14 15:56                                                 ` David S. Miller
2005-02-14 17:06                                                   ` Fruhwirth Clemens
2005-02-14 17:07                                                     ` David S. Miller
2005-02-14 17:28                                                       ` Fruhwirth Clemens
2005-02-14 18:16                                                         ` Andrew Morton
2005-02-22 19:16                                                           ` Fruhwirth Clemens
2005-02-12  0:24                                         ` Matt Mackall
2005-02-10 20:30                                       ` David S. Miller
2005-02-10  1:42                                 ` James Morris
2005-02-10  9:50                                   ` Fruhwirth Clemens
2005-02-02 23:00 ` James Morris

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=20050210023344.390fb358.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=adam@yggdrasil.com \
    --cc=clemens@endorphin.org \
    --cc=davem@davemloft.net \
    --cc=jmorris@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal@logix.cz \
    /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®