All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J.A. Magallon" <jamagallon@able.es>
To: Hugh Dickins <hugh@veritas.com>
Cc: Marcelo Tosatti <marcelo@conectiva.com.br>,
	Linus Torvalds <torvalds@transmeta.com>,
	Dave Jones <davej@suse.de>,
	alad@hss.hns.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] free_swap_and_cache misses
Date: Tue, 22 Jan 2002 01:08:21 +0100	[thread overview]
Message-ID: <20020122010821.A19992@werewolf.able.es> (raw)
In-Reply-To: <Pine.LNX.4.21.0201210016040.1153-100000@localhost.localdomain>
In-Reply-To: <Pine.LNX.4.21.0201210016040.1153-100000@localhost.localdomain>; from hugh@veritas.com on lun, ene 21, 2002 at 01:21:29 +0100


On 20020121 Hugh Dickins wrote:
>free_swap_and_cache() often misses its purpose and leaves freeable page
>in swap and cache.  Wrong in mainline 2.4 and 2.5, but looks okay in -aa
>(so don't bother to apply this if you're now merging that).
>
>Hugh
>
>--- 2.4.18-pre4/mm/swapfile.c	Sun Dec 23 10:47:32 2001
>+++ linux/mm/swapfile.c	Sun Jan 20 23:30:52 2002
>@@ -344,7 +344,7 @@
> 	if (page) {
> 		page_cache_get(page);
> 		/* Only cache user (+us), or swap space full? Free it! */
>-		if (page_count(page) == 2 || vm_swap_full()) {
>+		if (page_count(page) - !!page->buffers == 2 || vm_swap_full()) {

Don't you trust too much on precendence, people...?

-		if (page_count(page) == 2 || vm_swap_full()) {
+		if ( ((page_count(page) - !!page->buffers) == 2) || vm_swap_full() ) {

Or i'm paranoid.

-- 
J.A. Magallon                           #  Let the source be with you...        
mailto:jamagallon@able.es
Mandrake Linux release 8.2 (Cooker) for i586
Linux werewolf 2.4.18-pre4-beo #3 SMP Wed Jan 16 02:58:41 CET 2002 i686

      reply	other threads:[~2002-01-22  0:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-21  0:21 [PATCH] free_swap_and_cache misses Hugh Dickins
2002-01-22  0:08 ` J.A. Magallon [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=20020122010821.A19992@werewolf.able.es \
    --to=jamagallon@able.es \
    --cc=alad@hss.hns.com \
    --cc=davej@suse.de \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=torvalds@transmeta.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.