linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Zheng Liu <gnehzuil.liu@gmail.com>
To: Simon Jeons <simon.jeons@gmail.com>
Cc: Konstantin Khlebnikov <khlebnikov@openvz.org>,
	linux-mm@kvack.org, muming.wq@taobao.com
Subject: Re: [question] call mark_page_accessed() in minor fault
Date: Sat, 27 Apr 2013 19:14:35 +0800	[thread overview]
Message-ID: <20130427111435.GA6443@gmail.com> (raw)
In-Reply-To: <517B80DD.7010008@gmail.com>

On Sat, Apr 27, 2013 at 03:40:13PM +0800, Simon Jeons wrote:
> Hi Zheng,
> On 04/27/2013 03:55 PM, Zheng Liu wrote:
> >On Sat, Apr 27, 2013 at 03:10:30PM +0800, Simon Jeons wrote:
> >>Hi Zheng,
> >>On 04/23/2013 09:49 PM, Zheng Liu wrote:
> >>>Hi Konstantin,
> >>>
> >>>On Tue, Apr 23, 2013 at 05:02:34PM +0400, Konstantin Khlebnikov wrote:
> >>>>Zheng Liu wrote:
> >>>>>Hi all,
> >>>>>
> >>>>>Recently we meet a performance regression about mmaped page.  When we upgrade
> >>>>>our product system from 2.6.18 kernel to a latest kernel, such as 2.6.32 kernel,
> >>>>>we will find that mmaped pages are reclaimed very quickly.  We found that when
> >>>>>we hit a minor fault mark_page_accessed() is called in 2.6.18 kernel, but in
> >>>>>2.6.32 kernel we don't call mark_page_accesed().  This means that mmaped pages
> >>>>>in 2.6.18 kernel are activated and moved into active list.  While in 2.6.32
> >>>>>kernel mmaped pages are still kept in inactive list.
> >>>>>
> >>>>>So my question is why we call mark_page_accessed() in 2.6.18 kernel, but don't
> >>>>>call it in 2.6.32 kernel.  Has any reason here?
> >>>>Behavior was changed in commit
> >>>>v2.6.28-6130-gbf3f3bc "mm: don't mark_page_accessed in fault path"
> >>>Thanks for pointing it out.
> >>>
> >>>>Please see also commits
> >>>>v3.2-4876-g34dbc67 "vmscan: promote shared file mapped pages" and
> >>>Yes, I will give it try.  If I understand correctly, this commit is
> >>>useful for multi-processes program that access a shared mmaped page,
> >>>but that could not be useful for us because our program is multi-thread.
> >>What's the difference behavior between multi-processes and
> >>multi-thread in this case?
> >Hi Simon,
> >
> >Sorry, I am not a MM expert.  IIUC, if we have two processes, this
> >mmaped page will be moved into active list.  But if we only have two
> >threads, reference_ptes == 1, and this mmaped page won't be moved into
> >active list.  Finally this page could be evicted.  Am I missing
> >something?
> 
> Multi-threads will have same mm_struct and task_struct?

Multi-threads share one mm_struct and have different task_struct's.
Multi-processes have different mm_struct's and task_struct's.

Regards,
                                                - Zheng

--
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-04-27 10:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-23 12:25 [question] call mark_page_accessed() in minor fault Zheng Liu
2013-04-23 13:02 ` Konstantin Khlebnikov
2013-04-23 13:49   ` Zheng Liu
2013-04-27  7:10     ` Simon Jeons
2013-04-27  7:55       ` Zheng Liu
2013-04-27  7:40         ` Simon Jeons
2013-04-27 11:14           ` Zheng Liu [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=20130427111435.GA6443@gmail.com \
    --to=gnehzuil.liu@gmail.com \
    --cc=khlebnikov@openvz.org \
    --cc=linux-mm@kvack.org \
    --cc=muming.wq@taobao.com \
    --cc=simon.jeons@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 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).