Re: [PATCH 01/04] Adding cipher mode context information tocrypto_tfm

From: Fruhwirth Clemens
Date: Mon Feb 14 2005 - 12:31:42 EST


On Mon, 2005-02-14 at 09:07 -0800, David S. Miller wrote:
> On Mon, 14 Feb 2005 18:06:39 +0100
> Fruhwirth Clemens <clemens@xxxxxxxxxxxxx> wrote:
>
> > There is nothing wrong with having special methods, that lack generality
> > but are superior in performance. There is something wrong, when there
> > are no other. And there are no other for holding three kmappings or more
> > concurrently.
>
> You want more resources in a context where no such thing exists,
> in interrupt processing context. There the stack is limited, allocatable
> memory is limited, etc. etc. etc. And all of this is because you cannot
> sleep in interrupt context.

I have said nothing about sleeping in interrupt or softirq context.

First, one has to make kmap fallible. Second, ensure that it does not
fail often. This can be done by creating a page table pool, where kmap
can allocate page tables from, when all of the remaining page tables are
full. The mempool is of course refilled at the next occasion.

For stuff, that cannot be allowed to fail, kmap_atomic is still there.
--
Fruhwirth Clemens <clemens@xxxxxxxxxxxxx> http://clemens.endorphin.org

Attachment: signature.asc
Description: This is a digitally signed message part