Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp1744186imc; Fri, 22 Feb 2019 10:19:57 -0800 (PST) X-Google-Smtp-Source: AHgI3IanEWZ8SuEa6spm1lzA/JfKG5ceK/dd53RJhxXoNZdohhJQducg6Mp0p5ZoJBL1hYufOrfw X-Received: by 2002:a63:e410:: with SMTP id a16mr5271270pgi.28.1550859597841; Fri, 22 Feb 2019 10:19:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550859597; cv=none; d=google.com; s=arc-20160816; b=s4Tq8od/Gx1INVzcRje0eiFVVNC4jiQf+L8bhTcBo2uYlw/YcHp/OJc1IwjXI9rtOR c7VuupTrfDU5U7WTP2yRpQfKqAd24dVvgvrYHRF11R6FfUzVkR3/8rhvwAAjNn1sO+6H UZJyaG+rew23ZI0G4pcFrhXw01+HN54CXPdfKmovII5ZmSpViNqk2X+a24WV6gpQ7MW9 c1vsaDI8aBuWZEC906fg22Hp5R8oKIT95PWSGsd3Lq0qQVIJWKRBL3eN47ydOfk1GBp6 cNdOr8f8VCpn6w5vLy+xfThb0ulL1lPzouo7GWj//+EhfWMDzaJmuKGqBYzgsOsNNOgh ghUA== 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:dkim-signature; bh=0bawKPdSciLwxYkj5tT0CcwjFzFD912EtDh0Rtp/xl0=; b=UCCWoMLAFns5EzKHUUTgTeLRk7T02+anKkbqqK+npJIRwv/KHTMQ4yCxE1jNsVpDZf dFqpTgGtAzxmr6nM1zyUrEEJw7ACb+zUZCdPCwJyguKQ2/lGKhIQpsIX0qN/L2jZ/bR4 ITF2EBz56ON7G5ebT2vgPplzIZXIidzdzY9lCbTJXBTimNthdYb8ItQriQIAGx6owg3w E63rUCtI+lB4QdcRpCJUswDftnmxI1q+dFl7POSQlPhHCcX8J9RIt/1MVepibkCKiZG6 bG54VLhjnZsVH96lDM8+evN8AX13e8RECyAU2THQZlp5QXGApu8PiORSO2iL2tzZuG8O VO7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=UUIgJ9YC; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s2si1830293pfm.289.2019.02.22.10.19.41; Fri, 22 Feb 2019 10:19:57 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=UUIgJ9YC; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727482AbfBVSRq (ORCPT + 99 others); Fri, 22 Feb 2019 13:17:46 -0500 Received: from mail-yw1-f65.google.com ([209.85.161.65]:45595 "EHLO mail-yw1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726633AbfBVSRp (ORCPT ); Fri, 22 Feb 2019 13:17:45 -0500 Received: by mail-yw1-f65.google.com with SMTP id r188so1041239ywb.12; Fri, 22 Feb 2019 10:17:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=0bawKPdSciLwxYkj5tT0CcwjFzFD912EtDh0Rtp/xl0=; b=UUIgJ9YCbjXdf5DGn47xL/rjuyMZs7+Z8zc/LuZDzDKENNi95g3fuW7QPG8JOJyyga D65YjVCHZRrD36AzY13M4HPg8nKmaW5e2CPnXU3IPK14ACiMw4irkqoL0+AUgMMK5H5w +K/qzCE3dzl0kNlm9trrgVWusOuf3yiSD+QexEthHcF+tz/tvEFrCY4mE00nRql/YQaE 5Z/mdn5M/QRpfv6AMOut0G22KGtmb9/T4C1NGcvsOuhFA8vVmCqCFZ/sRJnsIPcf2KIS 0ocbx997oHZ/C99HtIkcDywlGg2CWHZ84z3awRuOLjGK1PQHL875nmBAMeP3nmcorP1/ HTkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=0bawKPdSciLwxYkj5tT0CcwjFzFD912EtDh0Rtp/xl0=; b=DBJcAPqNtHOn9SJqXOcJb9vwj58aLfS4JnCWuuCIrxjX9Tf2TZqb4JRFZXD6m64Ho1 z89vEWPWtBPiywJSiIZAB3VtLK0OaBqMAFiYx+1EtuPOoS9GktH9sL3ZoKzzdVEip0MN bIej+S2COFPo2Iai81DifH0zUVPNTT/U+w+1ENV/u8tertcvuGMEvuc8xLM+uqrN7tOj kXWJ+bfdoFMU+l6wxAa3RImontgLFo/ONpI5XyCcEf4xxSMfGTNnvfsAYbMbcB4VACBE 0AS7H+QAC97t7Tgf0TBvx+2wTkXcy4Sjc9YIGpUihD1iH2LLjqo5ooUO0yXb/8Mlmu4/ GETg== X-Gm-Message-State: AHQUAuY2dvhVMD7pwaBfsBLu4ayl675puim1utqx60r/vCU41enIFaOf 7wxMl/V37SfrtmjW3qYF74U= X-Received: by 2002:a81:5c89:: with SMTP id q131mr4208715ywb.90.1550859464560; Fri, 22 Feb 2019 10:17:44 -0800 (PST) Received: from localhost ([2620:10d:c091:200::1:6831]) by smtp.gmail.com with ESMTPSA id l73sm748003ywc.70.2019.02.22.10.17.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Feb 2019 10:17:43 -0800 (PST) Date: Fri, 22 Feb 2019 10:17:40 -0800 From: Tejun Heo To: Oleg Nesterov 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: <20190222181740.GZ50184@devbig004.ftw2.facebook.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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190222163441.GA5596@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey, Oleg. On Fri, Feb 22, 2019 at 05:34:42PM +0100, Oleg Nesterov wrote: > > ptrace support is a lot less important than kill for sure but if at > > all possible I think it'd be better to have it > > Tejun, I agree it would be better. I did not argue with that. > > The question is how this can be implemented. And how much uglifications^W > complications in the core kernel code this needs. Yeah, sure thing. It's always a trade-off but given that this is something we're gonna expose to userspace as an API which will be difficult to change too noticeably once released, I think it'd be worthwhile to spend some effort to get the visible semantics right. > > To summarize, the ideal result is the frozen state to be "stuck in > > jobctl stop loop" > > Not sure I understand, but I don't think this can work... > > Let me repeat, imo the freezer should be "reliable", it shouldn't stuck > in CGRP_FREEZE state forever if, say, it races with vfork(). And personally > I think this is more important than (very limited) ptrace support. Absolutely, it makes no sense to ship it otherwise. I don't think anyone is saying that we can ship it while it doesn't work reliably. > So I think it too should somehow interact with freezable_schedule/etc. You mean freezer_do_not_count(), right? 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? Thanks. -- tejun