[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <3EC7D30A-B8F7-416B-8B1D-A19350C57D82@dilger.ca>
Date: Thu, 10 Mar 2011 14:24:07 -0700
From: Andreas Dilger <adilger@...ger.ca>
To: Chris Mason <chris.mason@...cle.com>
Cc: Vivek Goyal <vgoyal@...hat.com>,
Justin TerAvest <teravest@...gle.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
m-ikeda <m-ikeda@...jp.nec.com>, jaxboe <jaxboe@...ionio.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
ryov <ryov@...inux.co.jp>, taka <taka@...inux.co.jp>,
"righi.andrea" <righi.andrea@...il.com>,
guijianfeng <guijianfeng@...fujitsu.com>,
balbir <balbir@...ux.vnet.ibm.com>,
ctalbott <ctalbott@...gle.com>, nauman <nauman@...gle.com>,
mrubin <mrubin@...gle.com>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [RFC] Storing cgroup id in page->private (Was: Re: [RFC] [PATCH 0/6] Provide cgroup isolation for buffered writes.)
On 2011-03-10, at 2:15 PM, Chris Mason wrote:
> Excerpts from Vivek Goyal's message of 2011-03-10 14:41:06 -0500:
>> On Thu, Mar 10, 2011 at 02:11:15PM -0500, Vivek Goyal wrote:
>>>>> I think the person who dirtied the page can store the information in
>>>>> page->private (assuming buffer heads were not generated) and if flusher
>>>>> thread later ends up generating buffer heads and ends up modifying
>>>>> page->private, this can be copied in buffer heads?
>>>>
>>>> This scares me a bit.
>>>>
>>>> As I understand it, fs/ code expects total ownership of page->private.
>>>> This adds a responsibility for every user to copy the data through and
>>>> store it in the buffer head (or anything else). btrfs seems to do
>>>> something entirely different in some cases and store a different kind
>>>> of value.
>>>
>>> If filesystems are using page->private for some other purpose also, then
>>> I guess we have issues.
>>>
>>> I am ccing linux-fsdevel to have some feedback on the idea of trying
>>> to store cgroup id of page dirtying thread in page->private and/or buffer
>>> head for tracking which group originally dirtied the page in IO controller
>>> during writeback.
>>
>> A quick "grep" showed that btrfs, ceph and logfs are using page->private
>> for other purposes also.
>>
>> I was under the impression that either page->private is null or it
>> points to buffer heads for the writeback case. So storing the info
>> directly in either buffer head directly or first in page->private and
>> then transferring it to buffer heads would have helped.
>
> Right, btrfs has its own uses for page->private, and we expect to own
> it. With a proper callback, the FS could store the extra information you
> need in out own structs.
There is no requirement that page->private ever points to a buffer_head, and Lustre clients use it for its own tracking structure (never touching buffer_heads at all). Any assumption about what a filesystem is storing in page->private in other parts of the code is just broken.
Cheers, Andreas
--
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