From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752175AbdFUWT6 convert rfc822-to-8bit (ORCPT ); Wed, 21 Jun 2017 18:19:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44574 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751265AbdFUWT4 (ORCPT ); Wed, 21 Jun 2017 18:19:56 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B3F3E7F3F2 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=longman@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B3F3E7F3F2 Subject: Re: [RFC PATCH-cgroup 5/6] cgroup: Skip dying css in cgroup_apply_control_{enable,disable} To: Tejun Heo Cc: Li Zefan , Johannes Weiner , Peter Zijlstra , Ingo Molnar , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, pjt@google.com, luto@amacapital.net, efault@gmx.de, torvalds@linux-foundation.org References: <1497452737-11125-1-git-send-email-longman@redhat.com> <1497452737-11125-6-git-send-email-longman@redhat.com> <20170621214216.GE14720@htj.duckdns.org> <81c62822-8bb6-ae68-112a-dad49414e3f1@redhat.com> <20170621220438.GB18600@htj.duckdns.org> From: Waiman Long Organization: Red Hat Message-ID: Date: Wed, 21 Jun 2017 18:19:53 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <20170621220438.GB18600@htj.duckdns.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Content-Language: en-US X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 21 Jun 2017 22:19:56 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/21/2017 06:04 PM, Tejun Heo wrote: > Hello, > > On Wed, Jun 21, 2017 at 06:01:56PM -0400, Waiman Long wrote: >> I do think that it can happen with existing code because CSS killing is >> asynchronous, I think. So the command can complete before the CSS is >> actually gone. If the next command to reactivate it happens fast enough, >> we can trigger that. When I added more checking to my test script >> essentially increasing the latency between successive tests, I couldn't >> trigger it anymore. > While disabling is asynchronous, there's a flushing logic before > starting reenabling things, so the existing code shouldn't trigger > that condition. But then there's should and the reality. :) > > Thanks. > I actually got errors from cgroup_addrm_files() complaining about creating existing sysfs files because of the css_populate_dir() call when the css was dying but not gone yet. I added code in the patch just to sidestep that. Maybe I should just force the call to css_create() when the old one is dying to see if that will work out. Cheers, Longman