Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934236AbbDVP4w (ORCPT ); Wed, 22 Apr 2015 11:56:52 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:37557 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934073AbbDVP4v (ORCPT ); Wed, 22 Apr 2015 11:56:51 -0400 Message-ID: <5537C4B2.1000703@fb.com> Date: Wed, 22 Apr 2015 09:56:34 -0600 From: Jens Axboe User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Jan Kara CC: Ming Lin , Ming Lin , lkml , , Dave Chinner , Changho Choi-SSI , "Kwan (Hingkwan) Huen-SSI" Subject: Re: [RFC DRAFT PATCH] per-buffered-write stream IDs References: <1429636187-30236-1-git-send-email-ming.l@samsung.com> <55368512.1020503@fb.com> <55369F7A.7090108@fb.com> <20150422135734.GA28300@quack.suse.cz> In-Reply-To: <20150422135734.GA28300@quack.suse.cz> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.52.13] X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-04-22_05:2015-04-22,2015-04-22,1970-01-01 signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3178 Lines: 64 On 04/22/2015 07:57 AM, Jan Kara wrote: > On Tue 21-04-15 13:05:30, Jens Axboe wrote: >> On 04/21/2015 12:34 PM, Ming Lin wrote: >>> On Tue, Apr 21, 2015 at 10:12 AM, Jens Axboe wrote: >>>> On 04/21/2015 11:09 AM, Ming Lin wrote: >>>>> >>>>> Hi Jens, >>>>> >>>>> This RFC DRAFT patch is on top of your "[PATCH v2] Support for write >>>>> stream IDs" >>>>> I throw it out early to get comments if it's the way to go. >>>>> >>>>> Quote LWN(https://urldefense.proofpoint.com/v1/url?u=http://lwn.net/Articles/638722%29:&k=ZVNjlDMF0FElm4dQtryO4A%3D%3D%0A&r=3JMVyziIyZtZ5cv9eWNLwQ%3D%3D%0A&m=eufWIgHAAF0gB7U%2FEOk2iHyObFrgcrM5NnNLDnRvmMc%3D%0A&s=5f6fea75e6421dfb626f57041781e733cb276872d2f9465187cc05bbcc3d7b0f >>>>> >>>>> "There would be clear value in a closer association between stream IDs >>>>> and specific buffered-write operations. Getting there would require >>>>> storing >>>>> the stream ID with each dirtied page, though; that, in turn, almost >>>>> certainly >>>>> implies shoehorning the stream ID into the associated page structure. >>>>> That would not be an easy task; it is not surprising that it is not a part >>>>> of >>>>> this patch set. Should the lack of per-buffered-write stream IDs prove to >>>>> be >>>>> a serious constraint in the future, somebody will certainly be motivated >>>>> to >>>>> try to find a place to store another eight bits in struct page." >>>>> >>>>> This draft patch stores stream_id in buffer head instead of page. >>>> >>>> >>>> This is pointless. You need to store it in the page, if the whole point is >>>> that you want this to be trackable. And adding it to struct page would be a >>>> no-go, we can't increase the size of that. See various other discussions >>>> around, for instance, IO priorities for buffered writeback and tracking that >>>> state on the side. >>> >>> I googled, but didn't find related discussions. >>> Could you please point me a link? >> >> This is the most recent effort: >> >> https://urldefense.proofpoint.com/v1/url?u=https://lwn.net/Articles/628631/&k=ZVNjlDMF0FElm4dQtryO4A%3D%3D%0A&r=3JMVyziIyZtZ5cv9eWNLwQ%3D%3D%0A&m=eufWIgHAAF0gB7U%2FEOk2iHyObFrgcrM5NnNLDnRvmMc%3D%0A&s=34699d56963c665d00d15e88c0f146122c693f9979a7fe7be7751f91a6372452 >> >> My point is that adding it to the buffer_head accomplishes nothing. >> You need to track from when the page was dirtied. > Technically, you could have a radix tree in an inode that would store > stream id (or other info you need to track) for each dirty page. I'm not > convinced it's worth the complexity and the overhead but it would be doable > and it won't bloat struct page... Yeah, that was my point, you'd need to track it on the side. But that's really just for the case of buffered IO where you can't rely on just the inode streamid. So I'm with you there, it's not a strict requirement by any stretch. It's something that can always be revisited, if we need to. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/