From: xue yong <ultraice.kernel@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: mm: dirty page problem
Date: Tue, 23 Jun 2009 21:32:33 +0800 [thread overview]
Message-ID: <fc71709d0906230632qefb072bj5ea7597b20972aa3@mail.gmail.com> (raw)
In-Reply-To: <1245757970.19816.1675.camel@twins>
On Tue, Jun 23, 2009 at 7:52 PM, Peter Zijlstra<peterz@infradead.org> wrote:
> On Tue, 2009-06-23 at 19:43 +0800, xue yong wrote:
>> Thanks a lot, Peter.
>> Your reply resolved my doubt.
>>
>> we have a service program (just say A) running with about 14G mmaped data.
>> and there is another daemon (just say B) do msync( SYNC) periodically.
>>
>> so I want to know in this pattern, was the data flushed to disk?
>
> I don't think so.
>
> The problem is that msync() only scans the current process' page tables,
> which would be clean since B doesn't write, only A does.
>
> So you'd have to modify your program, A, to do the msync() itself --
> possibly from a thread (threads share the vm context and thus page
> tables).
>
:) I did have this thought, because there was littile bo(block out),
and pmap showed that
the dirty pages belong to a process was always growing.
I believe you are the authority. Your confirmation matters.
In "Understanding the Linux® Virtual Memory Manager" page 163, Mel
Gorman said that
Process-mapped pages are not easily swappable because there is no
way to map struct pages to PTEs except to search every page table, which is far
too expensive.
So neither kswapd nor other kernel daemons do the scan job.
Without explicit action these pages would stay hidden.
>> and we have the problem, after we stoped/restarted A, many ditry
>> pages emerged,
>> about 4G data was flushed out in the following time.
>>
>> Thanks for your advice on these patches. I understand it now.
>> So if we change the kernel to a higher version, can we solve the
>> problem I mentioned above.
>
> Yes, I would recommend running a more recent kernel.
>
next prev parent reply other threads:[~2009-06-23 13:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-23 8:17 mm: dirty page problem xue yong
2009-06-23 9:02 ` xue yong
2009-06-23 10:33 ` Peter Zijlstra
[not found] ` <fc71709d0906230443pf8c4b34pcd4b7fa798fbf1ed@mail.gmail.com>
[not found] ` <1245757970.19816.1675.camel@twins>
2009-06-23 13:32 ` xue yong [this message]
2009-06-23 13:38 ` Peter Zijlstra
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=fc71709d0906230632qefb072bj5ea7597b20972aa3@mail.gmail.com \
--to=ultraice.kernel@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
/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