From: "David Chow" <davidchow@shaolinmicro.com>
To: Nikita@Namesys.COM
Cc: akpm@digeo.com, davidchow@shaolinmicro.com, linux-mm@kvack.org
Subject: Re: dirty pages path in kernel
Date: Sat, 1 Feb 2003 17:18:21 +0800 (HKT) [thread overview]
Message-ID: <1241.61.15.171.191.1044091101.squirrel@staff.shaolinmicro.com> (raw)
In-Reply-To: <15927.45619.775222.504275@laputa.namesys.com>
> Andrew Morton writes:
> > Andrew Morton wrote:
> > >
> > > David Chow <davidchow@shaolinmicro.com> wrote:
> > > >
> > > > Hi,
> > > >
> > > > If I do the following to an inode mapping page .
> > > >
> > > > 1. Generate a "struct page" from read_cache_page()
> > > > 2. kmap() the page, do some memset() (Dirty the page)
> > > > 3. kunmap() and page_cache_release() the page.
> > > >
> > >
> > > The VFS does not know that the page has changed.
> > >
> > > You should do:
> > >
> > > lock_page(page);
> > > memset()
> > > set_page_dirty(page);
> > > unlock_page(page);
> > >
> > > the page will be written to disk on the next kupdate cycle.
> >
> > Make that:
> >
> > lock_page(page);
> > kaddr = kmap_atomic(page, KM_USER0);
> > memset(kaddr, ...);
> > flush_dcache_page(page)
> > kunmap_atomic(kaddr, KM_USER0);
> > set_page_dirty(page);
>
> Shouldn't mark_page_accessed() go here?
>
> > unlock_page(page);
>
> Nikita.
Thanks for your help. However, do I have to deal with page ref cnts?
regards,
David
--
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/
prev parent reply other threads:[~2003-02-01 9:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-28 17:27 David Chow
2003-01-28 19:13 ` Andrew Morton
2003-01-28 21:08 ` Andrew Morton
2003-01-29 10:51 ` Nikita Danilov
2003-02-01 9:18 ` David Chow [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=1241.61.15.171.191.1044091101.squirrel@staff.shaolinmicro.com \
--to=davidchow@shaolinmicro.com \
--cc=Nikita@Namesys.COM \
--cc=akpm@digeo.com \
--cc=linux-mm@kvack.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