[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.0.9999.0712201116510.21557@woody.linux-foundation.org>
Date: Thu, 20 Dec 2007 11:24:01 -0800 (PST)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Jan Kara <jack@...e.cz>
cc: Bj?rn Steinbrink <B.Steinbrink@....de>,
Krzysztof Oledzki <olel@....pl>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Nick Piggin <nickpiggin@...oo.com.au>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Osterried <osterried@...se.de>, protasnb@...il.com,
bugme-daemon@...zilla.kernel.org
Subject: Re: [Bug 9182] Critical memory leak (dirty pages)
On Thu, 20 Dec 2007, Jan Kara wrote:
>
> As I wrote in my previous email, this solution works but hides the
> fact that the page really *has* dirty data in it and *is* pinned in memory
> until the commit code gets to writing it. So in theory it could disturb
> the writeout logic by having more dirty data in memory than vm thinks it
> has. Not that I'd have a better fix now but I wanted to point out this
> problem.
Well, I worry more about the VM being sane - and by the time we actually
hit this case, as far as VM sanity is concerned, the page no longer really
exists. It's been removed from the page cache, and it only really exists
as any other random kernel allocation.
The fact that low-level filesystems (in this case ext3 journaling) do
their own insane things is not something the VM even _should_ care about.
It's just an internal FS allocation, and the FS can do whatever the hell
it wants with it, including doing IO etc.
The kernel doesn't consider any other random IO pages to be "dirty" either
(eg if you do direct-IO writes using low-level SCSI commands, the VM
doesn't consider that to be any special dirty stuff, it's just random page
allocations again). This is really no different.
In other words: the Linux "VM" subsystem is really two differnt parts: the
low-level page allocator (which obviously knows that the page is still in
*use*, since it hasn't been free'd), and the higher-level file mapping and
caching stuff that knows about things like page "dirtyiness". And once
you've done a "remove_from_page_cache()", the higher levels are no longer
involved, and dirty accounting simply doesn't get into the picture.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists