From: ebiederm+eric@ccr.net (Eric W. Biederman)
To: Andrea Arcangeli <andrea@e-mind.com>
Cc: linux-mm@kvack.org
Subject: Re: 2.2.0-final
Date: 23 Jan 1999 20:57:10 -0600 [thread overview]
Message-ID: <m1pv85fke1.fsf@flinx.ccr.net> (raw)
In-Reply-To: Andrea Arcangeli's message of "Sat, 23 Jan 1999 21:56:20 +0100 (CET)"
>>>>> "AA" == Andrea Arcangeli <andrea@e-mind.com> writes:
bh-> b_count++ with bget(bh) and implementing bget() this way:
AA> extern inline unsigned int bget(struct buffer_head * bh)
AA> {
AA> buffer_get(bh);
AA> return ++bh->b_count;
AA> }
AA> where buffer_get() is this:
AA> extern inline void buffer_get(struct buffer_head *bh)
AA> {
AA> struct page * page = mem_map + MAP_NR(bh->b_data);
AA> switch (atomic_read(&page->count))
AA> {
AA> case 1:
AA> atomic_inc(&page->count);
AA> nr_freeable_pages--;
This is bogus. Consider the case when you have 4 buffers per page (common with ext2fs)
You will way underestimate the number of freeable pages.
AA> break;
AA> #if 1 /* PARANOID */
AA> case 0:
AA> printk(KERN_ERR "buffer_get: page was unused!\n");
AA> #endif
AA> }
AA> }
AA> And for b_count-- exists a bput().
AA> Taking uptodate the file cache instead is been very easier (some line
AA> changed and nothing more). Lukily the only b_count++ or b_count-- are in
AA> buffer.c and in ext2fs, other fs has one or two b_count only.
Eric
--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/
next prev parent reply other threads:[~1999-01-24 3:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.3.95.990120224340.23558G-100000@penguin.transmeta.com>
1999-01-23 20:56 ` 2.2.0-final Andrea Arcangeli
1999-01-24 1:51 ` 2.2.0-final Andrea Arcangeli
1999-01-24 2:57 ` Eric W. Biederman [this message]
1999-01-24 12:49 ` 2.2.0-final Andrea Arcangeli
1999-01-24 13:16 ` 2.2.0-final Andrea Arcangeli
1999-01-24 13:28 ` 2.2.0-final Andrea Arcangeli
1999-01-24 18:41 ` 2.2.0-final Eric W. Biederman
1999-01-24 23:05 ` 2.2.0-final Andrea Arcangeli
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=m1pv85fke1.fsf@flinx.ccr.net \
--to=ebiederm+eric@ccr.net \
--cc=andrea@e-mind.com \
--cc=linux-mm@kvack.org \
/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