Re: [PATCH] Proposed update to the kernel kmap/kunmap API

From: Andrew Morton
Date: Sun Aug 06 2006 - 15:52:03 EST


On Sun, 06 Aug 2006 10:01:55 -0500
James Bottomley <James.Bottomley@xxxxxxxxxxxx> wrote:

> The simple part of the proposal is to give non-highmem architectures
> access to the kmap API for the purposes of overriding (this is what the
> attached patch does).
>
> The more controversial part of the proposal is that we should now
> require all architectures with coherence issues to manage data coherence
> via the kmap/kunmap API. Thus driver writers never have to write code
> like

kmap() is a nasty thing. It has theoretical deadlock problems (which used
to be real ones back in the 2.4 days) and the present implementation uses a
kernel-wide lock.

We've been gradually and sporadically working to make kmap() go away, so
please let's not do anything which encourages its use.

kmap_atomic() is much preferred. Can this initiative be recast around
kmap_atomic()?
-
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/