linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mtrr Patt <mtrr.patt@gmail.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Rik van Riel <riel@redhat.com>,
	Dave Hansen <dave.hansen@intel.com>,
	Michal Hocko <mhocko@suse.cz>, Mel Gorman <mgorman@suse.de>,
	linux-mm@kvack.org
Subject: Re: Better active/inactive list balancing
Date: Thu, 02 May 2013 07:35:58 +0800	[thread overview]
Message-ID: <5181A6DE.7000400@gmail.com> (raw)
In-Reply-To: <20130501152105.GB8083@cmpxchg.org>

Hi Johannes,
On 05/01/2013 11:21 PM, Johannes Weiner wrote:
> Hi Wanpeng Li / Ni zhan Chen / Jaegeuk Hanse / Simon Jeons / Will Huck
> / Ric Mason / Sam Ben / Mtrr Patt!
>
> On Wed, May 01, 2013 at 02:55:53PM +0800, Mtrr Patt wrote:
>> Hi Johannes,
>> On 05/01/2013 12:32 AM, Johannes Weiner wrote:
>>> On Sat, Apr 27, 2013 at 02:20:54PM +0800, Mtrr Patt wrote:
>>>> cc linux-mm
>>>>
>>>> On 04/27/2013 02:19 PM, Mtrr Patt wrote:
>>>>> Hi Johannes,
>>>>>
>>>>> http://lwn.net/Articles/495543/
>>>>>
>>>>> This link said that "When active pages are considered for
>>>>> eviction, they are first moved to the inactive list and unmapped
>>>> >from the address space of the process(es) using them. Thus, once a
>>>>> page moves to the inactive list, any attempt to reference it will
>>>>> generate a page fault; this "soft fault" will cause the page to be
>>>>> removed back to the active list."
>>>>>
>>>>> Why I can't find the codes unmap during page moved from active
>>>>> list to inactive list?
>>> Most architectures have the hardware track the referenced bit in the
>>> page tables, but some don't.  For them, page_referenced_one() will
>>> mark the mapping read-only when clearing the referenced/young bit and
>>> the page fault handler will set the bit manually.
>> Thanks for your response. ;-) So the article is not against more
>> common case, isn't it?
> It's about the generic/theoretic case I guess, not the optimized
> implementation.
>
>>> When mapped pages reach the end of the inactive list and have that bit
>>> set, they get activated, see page_check_references().
>> It seems that the page should trigger page fault twice and
>> page_check_references can active it.
> The first one brings it into memory (major fault), the second one sets
> the referenced bit (minor fault or set by mmu).  Then it gets
> activated.  That is the case for mmap accessed pages.
>
> Buffered IO (read/write syscalls) enters the kernel anyway, so we
> activate the pages right then and there with mark_page_accessed().

Thanks for your explaination. Why you say hi to other guys, confuse me! ;-)

--
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-05-01 23:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <517B6DF5.70402@gmail.com>
2013-04-27  6:20 ` Better active/inactive list balancing Mtrr Patt
2013-04-30 16:32   ` Johannes Weiner
2013-05-01  6:55     ` Mtrr Patt
2013-05-01 15:21       ` Johannes Weiner
2013-05-01 23:35         ` Mtrr Patt [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=5181A6DE.7000400@gmail.com \
    --to=mtrr.patt@gmail.com \
    --cc=dave.hansen@intel.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.cz \
    --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 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).