From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [GIT PULL] cgroup changes for v3.15-rc1 Date: Thu, 3 Apr 2014 15:43:35 -0400 Message-ID: <20140403194335.GC2472@mtj.dyndns.org> References: <20140403164911.GE24119@htj.dyndns.org> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=ttZ2zRNfjZbSNaV4mfITFmKkzNbgrY2gCctSayS5NUc=; b=YovDO0nn81A/Z8J3lBJr+6HeGjdXFVB44df+lAXML/bdVuGQRACHz7Vw5i2mpRae5p IiEYTNhMs93PMtwRkRrpU+s/AOw3s9BkW2Ye8DH7r69lL1MX6Quaz2uqmoCmg5Z7CK7X NhC4PJSt4LoVoSF0uy8X7oa7R5GIr2tBnWdBsg+AoQN2r78lTXKr225G2wbIfo+39EBI fCuNJI4xgz6X1z8iDsvLuRk8gXcG+3u4240nZrlBaisIMvbXRUoe83JlFPeJJCcq53n9 ISXDv7EB1vYbxCF8xsbzuHarG9rUWfEyrnuKZn8BkTGZSteaueQ0P5hLmNTXpNR3sYXV wmlg== Content-Disposition: inline In-Reply-To: Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Linus Torvalds Cc: "Eric W. Biederman" , David Miller , Linux Kernel Mailing List , Li Zefan , Linux Containers , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Hello, On Thu, Apr 03, 2014 at 12:01:23PM -0700, Linus Torvalds wrote: > [ Extending the participants list a bit ] > > On Thu, Apr 3, 2014 at 11:34 AM, Tejun Heo wrote: > > On the road so sending from phone. Iirc the param is necessary to > > distinguishe when a new sb is created so that it can be put properly later. > > I think cgroup is leaking super ref now and li was planning to send a fix > > once things are merged. > > So as far as I can tell, cgroup is fine, because the superblock itself > is properly refcounted by the mounting code. It's the magic hidden Ah, I remembered the other way around. We could leak cgroup_root reference, not the other way around. cgroup_mount() can be called multiple times for the same sb and we inc cgroup_root's ref each time but cgroup_kill_sb() only happens when the sb is released, so if we do the following, # mkdir cpuset cpuset1 # mount -t cgroup -o cpuset cgroup cpuset # mount -t cgroup -o cpuset cgroup cpuset1 # umount cpuset # umount cpuset1 The cgroup_root should be destroyed but it isn't, I think. We'd need to bump cgroup_root's refcnt only when a new sb is created. It's kinda ugly. Hmmm... As for using specific type for ns tag, yeah, that'd be better regardless of this. The opaqueness is a bit extreme now. Thanks. -- tejun