From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Axboe Subject: Re: [PATCH cgroup/for-4.3-fixes] cgroup, writeback: don't enable cgroup writeback on traditional hierarchies Date: Thu, 24 Sep 2015 10:17:19 -0600 Message-ID: <5604220F.503@fb.com> References: <1434495193-31182-1-git-send-email-tj@kernel.org> <1434495193-31182-3-git-send-email-tj@kernel.org> <20150722035620.GD2944@thunk.org> <1443012552.19983.209.camel@gmail.com> <20150923180934.GE26647@mtj.duckdns.org> <20150923185137.GJ26647@mtj.duckdns.org> <20150923210729.GA23180@mtj.duckdns.org> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fb.com; h=subject : to : references : cc : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=facebook; bh=nm5V+Kwe/Q4b9C5NyRNQkuClSN1ejuzaoDgq+MMBRU8=; b=mwuNYxda7Ytf7wb3hwaMNiY0nk2gI6EPRCZthEYotu8rQJxcDHf+FHfC+CV0G2Botw3R rg5EU5wkyg85beKDiuzaB04TOWYIY+FZcTQOPW/4DYnHNn3+APGaXKT1MON5OGQer2+l 4W+ozap/5trnm6Ck5eVWFq+aRR9Ig6j0P4I= In-Reply-To: <20150923210729.GA23180-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Tejun Heo , Artem Bityutskiy Cc: Theodore Ts'o , axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org, kernel-team-b10kYP2dOMg@public.gmane.org, adilger.kernel-m1MBpc4rdrD3fQ9qLvQP4Q@public.gmane.org, linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Dexuan Cui On 09/23/2015 03:07 PM, Tejun Heo wrote: > inode_cgwb_enabled() gates cgroup writeback support. If it returns > true, each inode is attached to the corresponding memory domain which > gets mapped to io domain. It currently only tests whether the > filesystem and bdi support cgroup writeback; however, cgroup writeback > support doesn't work on traditional hierarchies and thus it should > also test whether memcg and iocg are on the default hierarchy. > > This caused traditional hierarchy setups to hit the cgroup writeback > path inadvertently and ended up creating separate writeback domains > for each memcg and mapping them all to the root iocg uncovering a > couple issues in the cgroup writeback path. > > cgroup writeback was never meant to be enabled on traditional > hierarchies. Make inode_cgwb_enabled() test whether both memcg and > iocg are on the default hierarchy. > > Signed-off-by: Tejun Heo > Reported-by: Artem Bityutskiy > Reported-by: Dexuan Cui > Link: http://lkml.kernel.org/g/1443012552.19983.209.camel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > Link: http://lkml.kernel.org/g/f30d4a6aa8a546ff88f73021d026a453-NHRYisGuqk8ni+flWUsx/pbBmlrREI7+ECdVDZe1NQc@public.gmane.org > --- > Hello, > > So, this should make the regression go away. It doesn't fix the > underlying bugs but they shouldn't get triggered by people not > experimenting with cgroup. > > I'm gonna keep digging the underlying issues but this should make the > regressions go away. If it's okay, I think it'd be better to route > this through cgroup/for-4.3-fixes as it's gonna cause a conflict with > for-4.4 branch and handling the merge there is easier. > > Thanks. > > include/linux/backing-dev.h | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) I'll ack this since it works around both the corruption issue and the performance regression, so we can avoid having to revert parts of this. And I know you'll keep hunting and get the real issue fixed in the mean time. Acked-by: Jens Axboe -- Jens Axboe From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Axboe Subject: Re: [PATCH cgroup/for-4.3-fixes] cgroup, writeback: don't enable cgroup writeback on traditional hierarchies Date: Thu, 24 Sep 2015 10:17:19 -0600 Message-ID: <5604220F.503@fb.com> References: <1434495193-31182-1-git-send-email-tj@kernel.org> <1434495193-31182-3-git-send-email-tj@kernel.org> <20150722035620.GD2944@thunk.org> <1443012552.19983.209.camel@gmail.com> <20150923180934.GE26647@mtj.duckdns.org> <20150923185137.GJ26647@mtj.duckdns.org> <20150923210729.GA23180@mtj.duckdns.org> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Cc: "Theodore Ts'o" , , , , , , , , , , Dexuan Cui To: Tejun Heo , Artem Bityutskiy Return-path: In-Reply-To: <20150923210729.GA23180-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-ext4.vger.kernel.org On 09/23/2015 03:07 PM, Tejun Heo wrote: > inode_cgwb_enabled() gates cgroup writeback support. If it returns > true, each inode is attached to the corresponding memory domain which > gets mapped to io domain. It currently only tests whether the > filesystem and bdi support cgroup writeback; however, cgroup writeback > support doesn't work on traditional hierarchies and thus it should > also test whether memcg and iocg are on the default hierarchy. > > This caused traditional hierarchy setups to hit the cgroup writeback > path inadvertently and ended up creating separate writeback domains > for each memcg and mapping them all to the root iocg uncovering a > couple issues in the cgroup writeback path. > > cgroup writeback was never meant to be enabled on traditional > hierarchies. Make inode_cgwb_enabled() test whether both memcg and > iocg are on the default hierarchy. > > Signed-off-by: Tejun Heo > Reported-by: Artem Bityutskiy > Reported-by: Dexuan Cui > Link: http://lkml.kernel.org/g/1443012552.19983.209.camel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > Link: http://lkml.kernel.org/g/f30d4a6aa8a546ff88f73021d026a453-NHRYisGuqk8ni+flWUsx/pbBmlrREI7+ECdVDZe1NQc@public.gmane.org > --- > Hello, > > So, this should make the regression go away. It doesn't fix the > underlying bugs but they shouldn't get triggered by people not > experimenting with cgroup. > > I'm gonna keep digging the underlying issues but this should make the > regressions go away. If it's okay, I think it'd be better to route > this through cgroup/for-4.3-fixes as it's gonna cause a conflict with > for-4.4 branch and handling the merge there is easier. > > Thanks. > > include/linux/backing-dev.h | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) I'll ack this since it works around both the corruption issue and the performance regression, so we can avoid having to revert parts of this. And I know you'll keep hunting and get the real issue fixed in the mean time. Acked-by: Jens Axboe -- Jens Axboe From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757194AbbIXQS7 (ORCPT ); Thu, 24 Sep 2015 12:18:59 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:17894 "EHLO m0001303.ppops.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755776AbbIXQS4 (ORCPT ); Thu, 24 Sep 2015 12:18:56 -0400 Subject: Re: [PATCH cgroup/for-4.3-fixes] cgroup, writeback: don't enable cgroup writeback on traditional hierarchies To: Tejun Heo , Artem Bityutskiy References: <1434495193-31182-1-git-send-email-tj@kernel.org> <1434495193-31182-3-git-send-email-tj@kernel.org> <20150722035620.GD2944@thunk.org> <1443012552.19983.209.camel@gmail.com> <20150923180934.GE26647@mtj.duckdns.org> <20150923185137.GJ26647@mtj.duckdns.org> <20150923210729.GA23180@mtj.duckdns.org> CC: "Theodore Ts'o" , , , , , , , , , , Dexuan Cui From: Jens Axboe Message-ID: <5604220F.503@fb.com> Date: Thu, 24 Sep 2015 10:17:19 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150923210729.GA23180@mtj.duckdns.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.54.13] X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151,1.0.33,0.0.0000 definitions=2015-09-24_08:2015-09-23,2015-09-24,1970-01-01 signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/23/2015 03:07 PM, Tejun Heo wrote: > inode_cgwb_enabled() gates cgroup writeback support. If it returns > true, each inode is attached to the corresponding memory domain which > gets mapped to io domain. It currently only tests whether the > filesystem and bdi support cgroup writeback; however, cgroup writeback > support doesn't work on traditional hierarchies and thus it should > also test whether memcg and iocg are on the default hierarchy. > > This caused traditional hierarchy setups to hit the cgroup writeback > path inadvertently and ended up creating separate writeback domains > for each memcg and mapping them all to the root iocg uncovering a > couple issues in the cgroup writeback path. > > cgroup writeback was never meant to be enabled on traditional > hierarchies. Make inode_cgwb_enabled() test whether both memcg and > iocg are on the default hierarchy. > > Signed-off-by: Tejun Heo > Reported-by: Artem Bityutskiy > Reported-by: Dexuan Cui > Link: http://lkml.kernel.org/g/1443012552.19983.209.camel@gmail.com > Link: http://lkml.kernel.org/g/f30d4a6aa8a546ff88f73021d026a453@SIXPR30MB031.064d.mgd.msft.net > --- > Hello, > > So, this should make the regression go away. It doesn't fix the > underlying bugs but they shouldn't get triggered by people not > experimenting with cgroup. > > I'm gonna keep digging the underlying issues but this should make the > regressions go away. If it's okay, I think it'd be better to route > this through cgroup/for-4.3-fixes as it's gonna cause a conflict with > for-4.4 branch and handling the merge there is easier. > > Thanks. > > include/linux/backing-dev.h | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) I'll ack this since it works around both the corruption issue and the performance regression, so we can avoid having to revert parts of this. And I know you'll keep hunting and get the real issue fixed in the mean time. Acked-by: Jens Axboe -- Jens Axboe