linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Pekka Enberg <penberg@iki.fi>
To: Bob Liu <lliubbo@gmail.com>
Cc: linux-mm@kvack.org, gregkh@linuxfoundation.org,
	ngupta@vflare.org, akpm@linux-foundation.org,
	konrad.wilk@oracle.com, sjenning@linux.vnet.ibm.com,
	riel@redhat.com, mgorman@suse.de, kyungmin.park@samsung.com,
	p.sarna@partner.samsung.com, barry.song@csr.com,
	penberg@kernel.org, Bob Liu <bob.liu@oracle.com>
Subject: Re: [PATCH v2 4/4] mm: add WasActive page flag
Date: Tue, 13 Aug 2013 09:01:05 +0300	[thread overview]
Message-ID: <5209CBA1.2080009@iki.fi> (raw)
In-Reply-To: <1375788977-12105-5-git-send-email-bob.liu@oracle.com>

On 8/6/13 2:36 PM, Bob Liu wrote:
> Zcache could be ineffective if the compressed memory pool is full with
> compressed inactive file pages and most of them will be never used again.
>
> So we pick up pages from active file list only, those pages would probably be
> accessed again. Compress them in memory can reduce the latency significantly
> compared with rereading from disk.
>
> When a file page is shrinked from active file list to inactive file list,
> PageActive flag is also cleared.
> So adding an extra WasActive page flag for zcache to know whether the file page
> was shrinked from the active list.
>
> Signed-off-by: Bob Liu <bob.liu@oracle.com>

Using a page flag for this seems like an ugly hack to me.
Can we rearrange the code so that vmscan notifies zcache
*before* the active page flag is cleared...?

                 Pekka

--
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:[~2013-08-13  6:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-06 11:36 [PATCH v2 0/4] zcache: a compressed file page cache Bob Liu
2013-08-06 11:36 ` [PATCH v2 1/4] mm: zcache: add core files Bob Liu
2013-08-06 11:36 ` [PATCH v2 2/4] zcache: staging: %s/ZCACHE/ZCACHE_OLD Bob Liu
2013-08-06 11:36 ` [PATCH v2 3/4] mm: zcache: add evict zpages supporting Bob Liu
2013-08-06 11:36 ` [PATCH v2 4/4] mm: add WasActive page flag Bob Liu
2013-08-13  6:01   ` Pekka Enberg [this message]
2013-08-13 13:50     ` Bob Liu
2013-08-06 13:58 ` [PATCH v2 0/4] zcache: a compressed file page cache Greg KH
2013-08-06 14:24   ` Bob Liu
2013-08-12 12:19     ` Konrad Rzeszutek Wilk
2013-08-12 12:25       ` Kyungmin Park
2013-08-12 12:30       ` Wanpeng Li
2013-08-12 13:23         ` Konrad Rzeszutek Wilk
2013-08-12 22:10           ` Greg KH
2013-08-12 12:30       ` Wanpeng Li
2013-08-09  8:03 ` Bob Liu

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=5209CBA1.2080009@iki.fi \
    --to=penberg@iki.fi \
    --cc=akpm@linux-foundation.org \
    --cc=barry.song@csr.com \
    --cc=bob.liu@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=konrad.wilk@oracle.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-mm@kvack.org \
    --cc=lliubbo@gmail.com \
    --cc=mgorman@suse.de \
    --cc=ngupta@vflare.org \
    --cc=p.sarna@partner.samsung.com \
    --cc=penberg@kernel.org \
    --cc=riel@redhat.com \
    --cc=sjenning@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).