linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Hua Zhong <hzhong@gmail.com>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org, linux-mm@kvack.org,
	Hugh Dickins <hugh@veritas.com>
Subject: Re: [PATCH] fix can_share_swap_page() when !CONFIG_SWAP
Date: Mon, 08 May 2006 15:18:13 +1000	[thread overview]
Message-ID: <445ED495.3020401@yahoo.com.au> (raw)
In-Reply-To: <Pine.LNX.4.64.0605071525550.2515@localhost.localdomain>

Hua Zhong wrote:

>Hi,
>
>can_share_swap_page() is used to check if the page has the last reference. This avoids allocating a new page for COW if it's the last page.
>
>However, if CONFIG_SWAP is not set, can_share_swap_page() is defined as 0, thus always causes a copy for the last COW page. The below simple patch fixes it.
>
>I'm not sure if it's the best fix. Maybe we should rename can_share_swap_page() and move it out of swapfile.c. Comments?
>

Looks like a good patch, nice catch. You should run it past Hugh but tend to
agree it would be nice to reuse the out of line can_share_swap_page, 
which would
fold beautifully with PageSwapCache a constant 0.

Nick
--

Send instant messages to your online friends http://au.messenger.yahoo.com 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2006-05-08  5:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-08  1:17 Hua Zhong
2006-05-08  5:18 ` Nick Piggin [this message]
2006-05-08 12:45   ` Hugh Dickins
2006-05-09  1:59     ` Nick Piggin
2006-05-09 11:25       ` Hugh Dickins

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=445ED495.3020401@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=akpm@osdl.org \
    --cc=hugh@veritas.com \
    --cc=hzhong@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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