[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1255042636.17055.33.camel@laptop>
Date: Fri, 09 Oct 2009 00:57:16 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: jim owens <jowens@...com>
Cc: Hugh Dickins <hugh.dickins@...cali.co.uk>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Ingo Molnar <mingo@...e.hu>, Avi Kivity <avi@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
David Howells <dhowells@...hat.com>,
lkml <linux-kernel@...r.kernel.org>,
linux-arch <linux-arch@...r.kernel.org>
Subject: Re: [RFC][PATCH] kmap_atomic_push
On Thu, 2009-10-08 at 18:27 -0400, jim owens wrote:
> So if I understand this correctly, the sequence:
>
> in = kmap_atomic(inpage, KM_USER1);
>
> out = kmap_atomic(outpage, KM_USER0);
>
> kunmap_atomic(in, KM_USER1);
>
> in = kmap_atomic(next_inpage, KM_USER1);
>
> is now illegal with this patch, which breaks code
> I am testing now for btrfs.
>
> My code does this because the in/out are zlib inflate
> and the in/out run at different rates.
You can do things like:
do {
in = kmap_atomic(inpage);
out = kmap_atomic(outpage);
<deflate until end of either in/out>
kunmap_atomic(outpage);
kunmap_atomic(inpage);
cond_resched();
<iterate bits>
} while (<not done>)
The double unmap gives a preemption point, which sounds like a good
thing to have, because your scheme could run for a long while without
enabling preemption, which is badness.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists