From: Andrew Morton <akpm@zip.com.au>
To: Rik van Riel <riel@conectiva.com.br>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: aa-110-zone_accounting
Date: Wed, 20 Mar 2002 11:11:23 -0800 [thread overview]
Message-ID: <3C98DEDB.B1FFB116@zip.com.au> (raw)
In-Reply-To: <3C9808EE.B5C38E84@zip.com.au> <Pine.LNX.4.44L.0203201043250.2181-100000@imladris.surriel.com>
Rik van Riel wrote:
>
> On Tue, 19 Mar 2002, Andrew Morton wrote:
>
> > 1: page_cache_size is no longer an atomic type - it's now just an
> > unsigned long. It's always altered under pagecache_lock.
>
> Is this change worth it ? This code will have to be changed
> back in any patch trying to fine-grain the pagecache lock...
Yes, it's the right change. Changes to page_cache_size always
occur at the same time as changes to the per-zone accounting.
So the locking is shared and it all nestles nicely.
In the longer-term we don't want that atomic_t either. We
need to avoid global and even per-zone atomic_t's and locks.
> Alternatively, maybe we should hide the page_cache_size behind
> magic macros too, so it's easier to change the underlying data
> structure(s).
I currently have:
+extern struct page_state {
+ unsigned long nr_dirty;
+ unsigned long nr_locked;
+ unsigned long nr_pagecache;
+} ____cacheline_aligned page_states[NR_CPUS];
+
+extern void get_page_state(struct page_state *ret);
-
prev parent reply other threads:[~2002-03-20 19:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-20 3:58 aa-110-zone_accounting Andrew Morton
2002-03-20 10:02 ` aa-110-zone_accounting Christoph Hellwig
2002-03-20 10:56 ` aa-110-zone_accounting Bill Davidsen
2002-03-20 13:45 ` aa-110-zone_accounting Rik van Riel
2002-03-20 19:11 ` Andrew Morton [this message]
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=3C98DEDB.B1FFB116@zip.com.au \
--to=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@conectiva.com.br \
/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