Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp4614574imc; Mon, 25 Feb 2019 07:58:12 -0800 (PST) X-Google-Smtp-Source: AHgI3IYwkfcrb5gnTGh6PC9DqhMPT9v20IyzHBYu+pzAow9BiaUfV4lKuYg+AKeUIx99CAKZoLD0 X-Received: by 2002:a63:6949:: with SMTP id e70mr19509495pgc.89.1551110291937; Mon, 25 Feb 2019 07:58:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551110291; cv=none; d=google.com; s=arc-20160816; b=HMItvIJAdpwORIN4pPYokyNCk8EZ13+Cn4xFLf8ELPuCnJjPuwtHeOQ76euHWAl0eZ R+vnIk4n3P/a9Nis5P5D8dTGQ8xRqY5P9FtTt32mhcE3FbDfmzzYVnEUrxRA/bgJ8Sgt Be/Lm5VEv9yoAVPcgfQspfZsWhp8+Dy0/2RbZN8apC+1cH/R7m1PRG61pX1crCpE9rsr 5uVUE278lm6TMOleEAHBVsG1cJEYIAJJq4LoI0CM/NDSTMDCLIXtM568sqd2u9cSlMl5 678T7wx1Qnb7Yv2mteqf4fWgD7EL4JEDIK3pYxmE17sGj3Aac5kPJjMqCSX72qAttzmf /nzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=u8/3KIpBAq0XaxcX3atkEMZqLv8/oeNVgI98yRv9QtY=; b=t0VflxyIvO3ayeUu1gVTHx19GzB9q4lYdhbvnyTi3JYwbYqefg4oo31x8p/lyKriUL +KJcaXGebCKybtaNxyKX5WR6FslfrCKVCRGoJBXP3F7bUZt8bvoyqXEfQ5aZCNPwkF6N cFG6tLpPP+sd4/Lb8+Z/LvJwmT6CG4Afm4hYZ7bhOdUrEHZSFrlgKTCT66U5gQ6huhNX q00mqJqmcHsAQfT0mUYVtiqAJIurEszB+7kTcAT1VnZ7F2ZwjfGXms0EI7BLjoqW05wJ GvarsZ/ItA+aUBnVg7ZctjkZjUyN6Efudm16w9RcK83vsJggXZ/dlgblz6OBj/eqHz9Y L3TA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h8si9659974pls.365.2019.02.25.07.57.56; Mon, 25 Feb 2019 07:58:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727733AbfBYP52 (ORCPT + 99 others); Mon, 25 Feb 2019 10:57:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46130 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727505AbfBYP52 (ORCPT ); Mon, 25 Feb 2019 10:57:28 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4ACE5308624A; Mon, 25 Feb 2019 15:57:28 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.43.17.31]) by smtp.corp.redhat.com (Postfix) with SMTP id E7C6960863; Mon, 25 Feb 2019 15:57:26 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Mon, 25 Feb 2019 16:57:28 +0100 (CET) Date: Mon, 25 Feb 2019 16:57:25 +0100 From: Oleg Nesterov To: Tejun Heo Cc: Roman Gushchin , Roman Gushchin , Kernel Team , "cgroups@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v8 0/7] freezer for cgroup v2 Message-ID: <20190225155725.GA8096@redhat.com> References: <20190219220252.4906-1-guro@fb.com> <20190220143748.GA9477@redhat.com> <20190220220020.GA16335@castle.DHCP.thefacebook.com> <20190221162923.GA26064@redhat.com> <20190221173422.GY50184@devbig004.ftw2.facebook.com> <20190222163441.GA5596@redhat.com> <20190222181740.GZ50184@devbig004.ftw2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190222181740.GZ50184@devbig004.ftw2.facebook.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Mon, 25 Feb 2019 15:57:28 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/22, Tejun Heo wrote: > > > So I think it too should somehow interact with freezable_schedule/etc. > > You mean freezer_do_not_count(), right? yes, > As long as the task is > guaranteed to be trapped by signal stop afterwards (and they are), we > likely can use them the same way. The only thing to be careful about > would be ensuring that we don't end up flipping group level frozen > state inbetween. Would something like that work? I have no idea because I do not understand what exactly do you mean ;) However. Thinking more about this, I am not sure my concerns were valid. Yes, cg freezer can "hang" if it races with vfork(). But probably we should blame vfork(), not freezer. The problem is, even ^Z can "hang" if the foreground process does vfork() and the new child stops before exit/exec. Now I recall that I even tried to make a patch to fix this using ERESTART_RESTARTBLOCK, but had some nasty problems with blocked signals... de_thread() should use freezable_schedule() in TASK_KILLABLE too. Currently it doesn't, but only because we have other (much more serious) problems with cred_guard_mutex/exec. However, this is is fine wrt cg freezer, other threads can't be frozen exactly because it is killable. Anything else does freezer_do_not_count() in TASK_KILLABLE and waits for another freezable process? So it seems I have to take my words back, perhaps we can forget about freezable_schedule/etc. Oleg.