All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nai Xia <nai.xia@gmail.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: linux-mm@kvack.org, Rik van Riel <riel@redhat.com>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Mel Gorman <mgorman@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Minchan Kim <minchan.kim@gmail.com>,
	Hugh Dickins <hughd@google.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [patch 0/5] refault distance-based file cache sizing
Date: Fri, 18 May 2012 11:44:39 +0800	[thread overview]
Message-ID: <4FB5C5A7.6080000@gmail.com> (raw)
In-Reply-To: <20120517210849.GE1800@cmpxchg.org>



On 2012/05/18 05:08, Johannes Weiner wrote:
> On Wed, May 16, 2012 at 08:56:54PM +0800, nai.xia wrote:
>> On 2012/05/16 14:51, Johannes Weiner wrote:
>>> There may have been improvements from clock-pro, but it's hard to get
>>> code merged that does not behave as expected in theory with nobody
>>> understanding what's going on.
>
> Damn, that sounded way harsher and arrogant than I wanted it to sound.
> And it's only based on what I gathered from the discussions on the
> list archives.  Sorry :(

No harm done, man. I just understood your words in this way. :)

But I do think that Clock-pro deserves its credit, since after all
it's that research work firstly brought the idea of "refault/reuse
distance" to the kernel community. Further more, it's also good
to let the researchers and the community to together have some
brain-storm of this problem if it's really hard to deal with in
reality.

>
>> OK, I assume that you do aware that the system you constructed with
>> this simple and understandable idea looks like a so called "feedback
>> system"? Or in other words, I think theoretically the refault-distance
>> of a page before and after your algorithm is applied is not the same.
>> And this changed refault-distance pattern is then feed as input into
>> your algorithm. A feedback system may be hard(and may be simple) to
>> analyze but may also work well magically.
>
> I'm with you on that, but I can't see an alternative in this case.  We

I trend to agree, I once tried to deal with an anti-LRU pattern(e.g. the
big loop like you said) of a app from kernel space and failed. Seems
it's hard to gather a very accurate information of a program's real memory
footprint in mixed workloads with only the help of pte bits...(but also
may due to my lack of skills in tweaking the reclaiming code...)

> can't predict future page accesses very well, so we have to take
> speculative shots and be considerate about the consequences.
>
> And BECAUSE we may get it wrong, the algorithm does not rely on the
> decisions it makes to be correct.  For example, it does not activate
> pages based on refault distance, but requires the refaulted page to
> win the race against an actual active page.  Likewise, pages are not
> evicted from the active list directly, instead they get a chance at
> re-activation when challenged.

Yes. That sounds a smart handling.

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Nai Xia <nai.xia@gmail.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: linux-mm@kvack.org, Rik van Riel <riel@redhat.com>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Mel Gorman <mgorman@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Minchan Kim <minchan.kim@gmail.com>,
	Hugh Dickins <hughd@google.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [patch 0/5] refault distance-based file cache sizing
Date: Fri, 18 May 2012 11:44:39 +0800	[thread overview]
Message-ID: <4FB5C5A7.6080000@gmail.com> (raw)
In-Reply-To: <20120517210849.GE1800@cmpxchg.org>



On 2012/05/18 05:08, Johannes Weiner wrote:
> On Wed, May 16, 2012 at 08:56:54PM +0800, nai.xia wrote:
>> On 2012/05/16 14:51, Johannes Weiner wrote:
>>> There may have been improvements from clock-pro, but it's hard to get
>>> code merged that does not behave as expected in theory with nobody
>>> understanding what's going on.
>
> Damn, that sounded way harsher and arrogant than I wanted it to sound.
> And it's only based on what I gathered from the discussions on the
> list archives.  Sorry :(

No harm done, man. I just understood your words in this way. :)

But I do think that Clock-pro deserves its credit, since after all
it's that research work firstly brought the idea of "refault/reuse
distance" to the kernel community. Further more, it's also good
to let the researchers and the community to together have some
brain-storm of this problem if it's really hard to deal with in
reality.

>
>> OK, I assume that you do aware that the system you constructed with
>> this simple and understandable idea looks like a so called "feedback
>> system"? Or in other words, I think theoretically the refault-distance
>> of a page before and after your algorithm is applied is not the same.
>> And this changed refault-distance pattern is then feed as input into
>> your algorithm. A feedback system may be hard(and may be simple) to
>> analyze but may also work well magically.
>
> I'm with you on that, but I can't see an alternative in this case.  We

I trend to agree, I once tried to deal with an anti-LRU pattern(e.g. the
big loop like you said) of a app from kernel space and failed. Seems
it's hard to gather a very accurate information of a program's real memory
footprint in mixed workloads with only the help of pte bits...(but also
may due to my lack of skills in tweaking the reclaiming code...)

> can't predict future page accesses very well, so we have to take
> speculative shots and be considerate about the consequences.
>
> And BECAUSE we may get it wrong, the algorithm does not rely on the
> decisions it makes to be correct.  For example, it does not activate
> pages based on refault distance, but requires the refaulted page to
> win the race against an actual active page.  Likewise, pages are not
> evicted from the active list directly, instead they get a chance at
> re-activation when challenged.

Yes. That sounds a smart handling.

  reply	other threads:[~2012-05-18  3:44 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-01  8:41 [patch 0/5] refault distance-based file cache sizing Johannes Weiner
2012-05-01  8:41 ` Johannes Weiner
2012-05-01  8:41 ` [patch 1/5] mm: readahead: move radix tree hole searching here Johannes Weiner
2012-05-01  8:41   ` Johannes Weiner
2012-05-01 21:06   ` Rik van Riel
2012-05-01 21:06     ` Rik van Riel
2012-05-01  8:41 ` [patch 2/5] mm + fs: prepare for non-page entries in page cache Johannes Weiner
2012-05-01  8:41   ` Johannes Weiner
2012-05-01 19:02   ` Andrew Morton
2012-05-01 19:02     ` Andrew Morton
2012-05-01 20:15     ` Johannes Weiner
2012-05-01 20:15       ` Johannes Weiner
2012-05-01 20:24       ` Andrew Morton
2012-05-01 20:24         ` Andrew Morton
2012-05-01 21:14         ` Rik van Riel
2012-05-01 21:14           ` Rik van Riel
2012-05-01 21:29         ` Johannes Weiner
2012-05-01 21:29           ` Johannes Weiner
2012-05-01  8:41 ` [patch 3/5] mm + fs: store shadow pages " Johannes Weiner
2012-05-01  8:41   ` Johannes Weiner
2012-05-01  8:41 ` [patch 4/5] mm + fs: provide refault distance to page cache instantiations Johannes Weiner
2012-05-01  8:41   ` Johannes Weiner
2012-05-01  9:30   ` Peter Zijlstra
2012-05-01  9:30     ` Peter Zijlstra
2012-05-01  9:55     ` Johannes Weiner
2012-05-01  9:55       ` Johannes Weiner
2012-05-01  9:58       ` Peter Zijlstra
2012-05-01  9:58         ` Peter Zijlstra
2012-05-01  8:41 ` [patch 5/5] mm: refault distance-based file cache sizing Johannes Weiner
2012-05-01  8:41   ` Johannes Weiner
2012-05-01 14:13   ` Minchan Kim
2012-05-01 14:13     ` Minchan Kim
2012-05-01 15:38     ` Johannes Weiner
2012-05-01 15:38       ` Johannes Weiner
2012-05-02  5:21       ` Minchan Kim
2012-05-02  5:21         ` Minchan Kim
2012-05-02  1:57   ` Andrea Arcangeli
2012-05-02  1:57     ` Andrea Arcangeli
2012-05-02  6:23     ` Johannes Weiner
2012-05-02  6:23       ` Johannes Weiner
2012-05-02 15:11       ` Andrea Arcangeli
2012-05-02 15:11         ` Andrea Arcangeli
2012-05-01 19:08 ` [patch 0/5] " Andrew Morton
2012-05-01 19:08   ` Andrew Morton
2012-05-01 21:19   ` Rik van Riel
2012-05-01 21:19     ` Rik van Riel
2012-05-01 21:26     ` Andrew Morton
2012-05-01 21:26       ` Andrew Morton
2012-05-02  1:10       ` Andrea Arcangeli
2012-05-02  1:10         ` Andrea Arcangeli
2012-05-03 13:15       ` Johannes Weiner
2012-05-03 13:15         ` Johannes Weiner
2012-05-16  5:25 ` nai.xia
2012-05-16  5:25   ` nai.xia
2012-05-16  6:51   ` Johannes Weiner
2012-05-16  6:51     ` Johannes Weiner
2012-05-16 12:56     ` nai.xia
2012-05-16 12:56       ` nai.xia
2012-05-17 21:08       ` Johannes Weiner
2012-05-17 21:08         ` Johannes Weiner
2012-05-18  3:44         ` Nai Xia [this message]
2012-05-18  3:44           ` Nai Xia
2012-05-18 15:07           ` Rik van Riel
2012-05-18 15:07             ` Rik van Riel
2012-05-18 15:30             ` Nai Xia
2012-05-18 15:30               ` Nai Xia
2012-05-18 15:30               ` Nai Xia
2012-05-17 13:11   ` Rik van Riel
2012-05-17 13:11     ` Rik van Riel
2012-05-18  5:03     ` Nai Xia
2012-05-18  5:03       ` Nai Xia
2012-05-18  5:03       ` Nai Xia

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=4FB5C5A7.6080000@gmail.com \
    --to=nai.xia@gmail.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=minchan.kim@gmail.com \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.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.