From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH 4/7] cgroup_freezer: don't stall transition to FROZEN for PF_NOFREEZE or PF_FREEZER_SKIP tasks Date: Mon, 22 Oct 2012 17:18:22 -0400 Message-ID: <20121022211822.GF5951@atj.dyndns.org> References: <1350426526-14254-1-git-send-email-tj@kernel.org> <1350426526-14254-5-git-send-email-tj@kernel.org> <20121022183453.GA24687@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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=9JFcVGtwlCAVuV3Z1nClOVxoTBwveS4r2VTNvuBo3qA=; b=IDG7FvPpicgon5iOKQIuDZOCF8wvi22Dv9NwDNHJ1wZtLPASDQFK3vlhw3M5+mnrP4 g+HD0+XPEnxkg440pQZaGc60rS1Nd9qMoIMJSPYOiSYrN3WdJSwAh+MbArxHH4VpxPK8 MIHBTQ+gzXrKD69a92d555n5RPNBZ2MYA9oOsSnWViepG2tz/bS4FqYb8Gri9e2R4eUE wAvlI05Dq78NyPSzI+Hzu/vtUGTKK5LXKt5FWBzr9LwU4mpBuJvYUl0mF+uE8+zKLE/n PwxcycX9je2orampFGowmCEPsRfPpjmXfygtYODJffKHRd4OAtJPdfut0Q6ve46/9FLt PwIA== Content-Disposition: inline In-Reply-To: <20121022183453.GA24687-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Oleg Nesterov Cc: rjw-KKrjLPT3xs0@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Hey, On Mon, Oct 22, 2012 at 08:34:53PM +0200, Oleg Nesterov wrote: > On 10/16, Tejun Heo wrote: > > > > cgroup_freezer doesn't transition from FREEZING to FROZEN if the > > cgroup contains PF_NOFREEZE tasks or tasks sleeping with > > PF_FREEZER_SKIP set. > > And thus the patch looks like another bugfix to me. It is but I'm not gonna send this one -stable. Nobody has complained yet and this is a userland visible behavior change, so I'd rather not risk it. > Just one question, and this question is offtopic again, > > > Only kernel tasks can be non-freezable (PF_NOFREEZE) > > Hmm. We seem to "leak" PF_NOFREEZE if a kernel thread execs? > Perhaps do_execve_common() should do set_freezable() before return. > > Or, at least, simply clear this flag along with PF_KTHREAD in > flush_old_exec(). Ooh, ouch, definitely. We should clear that. Can you please make a patch? Thanks. -- tejun From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756440Ab2JVVSa (ORCPT ); Mon, 22 Oct 2012 17:18:30 -0400 Received: from mail-vc0-f174.google.com ([209.85.220.174]:35747 "EHLO mail-vc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756403Ab2JVVS2 (ORCPT ); Mon, 22 Oct 2012 17:18:28 -0400 Date: Mon, 22 Oct 2012 17:18:22 -0400 From: Tejun Heo To: Oleg Nesterov Cc: rjw@sisk.pl, linux-kernel@vger.kernel.org, lizefan@huawei.com, containers@lists.linux-foundation.org, cgroups@vger.kernel.org Subject: Re: [PATCH 4/7] cgroup_freezer: don't stall transition to FROZEN for PF_NOFREEZE or PF_FREEZER_SKIP tasks Message-ID: <20121022211822.GF5951@atj.dyndns.org> References: <1350426526-14254-1-git-send-email-tj@kernel.org> <1350426526-14254-5-git-send-email-tj@kernel.org> <20121022183453.GA24687@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20121022183453.GA24687@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey, On Mon, Oct 22, 2012 at 08:34:53PM +0200, Oleg Nesterov wrote: > On 10/16, Tejun Heo wrote: > > > > cgroup_freezer doesn't transition from FREEZING to FROZEN if the > > cgroup contains PF_NOFREEZE tasks or tasks sleeping with > > PF_FREEZER_SKIP set. > > And thus the patch looks like another bugfix to me. It is but I'm not gonna send this one -stable. Nobody has complained yet and this is a userland visible behavior change, so I'd rather not risk it. > Just one question, and this question is offtopic again, > > > Only kernel tasks can be non-freezable (PF_NOFREEZE) > > Hmm. We seem to "leak" PF_NOFREEZE if a kernel thread execs? > Perhaps do_execve_common() should do set_freezable() before return. > > Or, at least, simply clear this flag along with PF_KTHREAD in > flush_old_exec(). Ooh, ouch, definitely. We should clear that. Can you please make a patch? Thanks. -- tejun