Thread (2 messages) 2 messages, 2 authors, 2002-12-11

Re: Question on set_page_dirty()

From: Jan Hudec <hidden>
Date: 2002-12-11 08:01:02

On Tue, Dec 10, 2002 at 10:59:34AM +0100, Martin Maletinsky wrote:
Hello,

Looking at the function set_page_dirty() (in linux 2.4.18-3 - see
below) I noticed, that it not only sets the pages PG_dirty bit (as the
SetPageDirty() macro does), but additionnally may link the page onto
a queue (more precisely the dirty queue of it's 'mapping').
That's the most important bit of it all. All dirty pages must at some
point be cleaned. The list keeps track of which pages need to be
cleaned, so kernel can do it quickly either when it needs to free the
mapping (close the file, terminate process, exec) or when it's just time
to flush some pages (in kflushd).
What is the meaning of this dirty queue, what is the effect of linking
a page onto that queue, and when should the set_page_dirty() function
be used rather than the
SetPageDirty() macro?
If you use the SetPageDirty macro, then the page is marked dirty, but
kernel can't find it when it should clean it. Thus it eventualy won't
flush the data (it won't call writepage on it).

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec [off-list ref]
--
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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help