From: Oleg Nesterov <oleg@tv-sign.ru>
To: linux-kernel@vger.kernel.org
Subject: Q: shrink_cache() vs release_pages()
Date: Thu, 13 Jan 2005 20:21:53 +0300 [thread overview]
Message-ID: <41E6AE31.5812BAF9@tv-sign.ru> (raw)
Hello.
shrink_cache:
if (get_page_testone(page)) {
__put_page(page);
SetPageLRU(page);
list_add(&page->lru, &zone->inactive_list);
continue;
}
Is it really necessary to re-add the page to inactive_list?
It seems to me that shrink_cache() can just do:
if (get_page_testone(page)) {
__put_page(page);
--zone->nr_inactive;
continue;
}
When the __page_cache_release (or whatever) takes zone->lru_lock
it must check PG_lru before del_page_from_lru().
The same question applies to refill_inactive_zone().
Thanks,
Oleg.
reply other threads:[~2005-01-13 16:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=41E6AE31.5812BAF9@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®