lkml.org 
[lkml]   [1999]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [patch] only-one-cache-query [was Re: [patch] arca-vm-2.2.5]
Hi,

On Wed, 7 Apr 1999 13:28:33 +0200 (CEST), Andrea Arcangeli
<andrea@e-mind.com> said:

> Last night I had a new idea on how to cleanly and trivially avoid the two
> cache query. We only need to know if we slept or not in GFP.

No, that's not a viable solution in the long term. We have been
steadily fine-graining the locking in the kernel by replacing the global
kernel lock with per-facility or per-resource locks, and in the future
we can expect to see the page cache also running without the global
lock.

At that point, we will need to drop any spinlocks we hold before calling
get_free_page(), because the scheduler will only drop the global lock
automatically if we sleep and we can't sleep with any other locks held.
Now, even if we _don't_ sleep, another CPU can get in to mess with the
page cache while we are doing allocation stuff.

> I am running the code while writing this and I'll release very soon a
> 2.2.5_arca8.bz2 with this new improvement included.

Fine, but it's a short-term fix. The hash-cookie mechanism has the
advantage of being suitable for a fine-grain-locked page cache in the
future.

--Stephen



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.087 / U:0.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site