From: Konstantin Khlebnikov <khlebnikov@openvz.org>
To: Hugh Dickins <hughd@google.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"minchan.kim@gmail.com" <minchan.kim@gmail.com>
Subject: Re: [PATCH v2] mm: add free_hot_cold_page_list helper
Date: Fri, 11 Nov 2011 15:29:07 +0400 [thread overview]
Message-ID: <4EBD0703.3090706@openvz.org> (raw)
In-Reply-To: <alpine.LSU.2.00.1111101810420.1239@sister.anvils>
Hugh Dickins wrote:
> On Tue, 1 Nov 2011, Konstantin Khlebnikov wrote:
>
>> This patch adds helper free_hot_cold_page_list() to free list of 0-order pages.
>> It frees pages directly from the list without temporary page-vector.
>> It also calls trace_mm_pagevec_free() to simulate pagevec_free() behaviour.
>
> Sorry for not speaking up sooner, but I do like this patch very much
> (and I'm content with your trace compatibility choice - whatever).
>
> Not so much in itself, but because it then allows a further patch
> (mainly to mm/vmscan.c) to remove two levels of pagevec, reducing
> its deepest stack by around 240 bytes.
That's Great. Also I don't like pagevec-based free because we sometimes do
extra lru lock-unlock on vector overflow.
>
> I have that patch, but keep putting off sending it in, because I want
> to show a reclaim stack overflow that it prevents, but the new avoidance
> of writeback in direct reclaim makes that harder to demonstrate. Damn!
>
> One question on your patch: where you have release_pages() doing
>> + list_add_tail(&page->lru,&pages_to_free);
>
> That seems reasonable, but given that __pagevec_free() proceeds by
> while (--i>= 0) {
> , starting from the far end of the pagevec (the most recently added
> struct page, the most likely to be hot), wouldn't you reproduce
> existing behaviour more accurately by a simple list_add()?
>
> Or have I got that back to front? If so, a comment on the
> list_add_tail() would help me to remember why - thanks.
>
> Hugh
Ok, this reasonable. Any way, the second its user: shrink_page_list() puts pages at the front.
WARNING: multiple messages have this Message-ID (diff)
From: Konstantin Khlebnikov <khlebnikov@openvz.org>
To: Hugh Dickins <hughd@google.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"minchan.kim@gmail.com" <minchan.kim@gmail.com>
Subject: Re: [PATCH v2] mm: add free_hot_cold_page_list helper
Date: Fri, 11 Nov 2011 15:29:07 +0400 [thread overview]
Message-ID: <4EBD0703.3090706@openvz.org> (raw)
In-Reply-To: <alpine.LSU.2.00.1111101810420.1239@sister.anvils>
Hugh Dickins wrote:
> On Tue, 1 Nov 2011, Konstantin Khlebnikov wrote:
>
>> This patch adds helper free_hot_cold_page_list() to free list of 0-order pages.
>> It frees pages directly from the list without temporary page-vector.
>> It also calls trace_mm_pagevec_free() to simulate pagevec_free() behaviour.
>
> Sorry for not speaking up sooner, but I do like this patch very much
> (and I'm content with your trace compatibility choice - whatever).
>
> Not so much in itself, but because it then allows a further patch
> (mainly to mm/vmscan.c) to remove two levels of pagevec, reducing
> its deepest stack by around 240 bytes.
That's Great. Also I don't like pagevec-based free because we sometimes do
extra lru lock-unlock on vector overflow.
>
> I have that patch, but keep putting off sending it in, because I want
> to show a reclaim stack overflow that it prevents, but the new avoidance
> of writeback in direct reclaim makes that harder to demonstrate. Damn!
>
> One question on your patch: where you have release_pages() doing
>> + list_add_tail(&page->lru,&pages_to_free);
>
> That seems reasonable, but given that __pagevec_free() proceeds by
> while (--i>= 0) {
> , starting from the far end of the pagevec (the most recently added
> struct page, the most likely to be hot), wouldn't you reproduce
> existing behaviour more accurately by a simple list_add()?
>
> Or have I got that back to front? If so, a comment on the
> list_add_tail() would help me to remember why - thanks.
>
> Hugh
Ok, this reasonable. Any way, the second its user: shrink_page_list() puts pages at the front.
--
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>
next prev parent reply other threads:[~2011-11-11 11:29 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-29 7:58 [PATCH] mm: add free_hot_cold_page_list helper Konstantin Khlebnikov
2011-07-29 7:58 ` Konstantin Khlebnikov
2011-08-26 22:21 ` Andrew Morton
2011-08-26 22:21 ` Andrew Morton
2011-08-27 6:44 ` Konstantin Khlebnikov
2011-08-27 6:44 ` Konstantin Khlebnikov
2011-08-29 7:48 ` Minchan Kim
2011-08-29 7:48 ` Minchan Kim
2011-10-31 20:14 ` Andrew Morton
2011-10-31 20:14 ` Andrew Morton
2011-11-01 7:47 ` Konstantin Khlebnikov
2011-11-01 7:47 ` Konstantin Khlebnikov
2011-11-01 8:45 ` [PATCH v2] " Konstantin Khlebnikov
2011-11-01 8:45 ` Konstantin Khlebnikov
2011-11-10 23:42 ` Andrew Morton
2011-11-10 23:42 ` Andrew Morton
2011-11-11 11:19 ` Konstantin Khlebnikov
2011-11-11 11:19 ` Konstantin Khlebnikov
2011-11-11 2:31 ` Hugh Dickins
2011-11-11 2:31 ` Hugh Dickins
2011-11-11 11:29 ` Konstantin Khlebnikov [this message]
2011-11-11 11:29 ` Konstantin Khlebnikov
2011-11-11 13:39 ` [PATCH v3 1/4] " Konstantin Khlebnikov
2011-11-11 13:39 ` Konstantin Khlebnikov
2011-11-11 23:32 ` Minchan Kim
2011-11-11 23:32 ` Minchan Kim
2011-11-14 1:45 ` Hugh Dickins
2011-11-14 1:45 ` Hugh Dickins
2011-11-11 13:40 ` [PATCH v3 2/4] mm: remove unused pagevec_free Konstantin Khlebnikov
2011-11-11 13:40 ` Konstantin Khlebnikov
2011-11-11 23:33 ` Minchan Kim
2011-11-11 23:33 ` Minchan Kim
2011-11-14 1:46 ` Hugh Dickins
2011-11-14 1:46 ` Hugh Dickins
2011-11-11 13:40 ` [PATCH v3 3/4] mm-tracepoint: rename page-free events Konstantin Khlebnikov
2011-11-11 13:40 ` Konstantin Khlebnikov
2011-11-11 23:36 ` Minchan Kim
2011-11-11 23:36 ` Minchan Kim
2011-11-11 13:40 ` [PATCH v3 4/4] mm-tracepoint: fixup documentation and examples Konstantin Khlebnikov
2011-11-11 13:40 ` Konstantin Khlebnikov
2011-11-11 23:37 ` Minchan Kim
2011-11-11 23:37 ` Minchan Kim
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=4EBD0703.3090706@openvz.org \
--to=khlebnikov@openvz.org \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan.kim@gmail.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.