Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8657733imu; Tue, 4 Dec 2018 11:57:38 -0800 (PST) X-Google-Smtp-Source: AFSGD/V65eaSKZuu0VYjYic98bALI5p1tKfjKBOHdlv2xZeWdkCHM1nXEo8w6e+4xiCQRS98vVBK X-Received: by 2002:a62:8096:: with SMTP id j144mr21749856pfd.140.1543953458577; Tue, 04 Dec 2018 11:57:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543953458; cv=none; d=google.com; s=arc-20160816; b=NG3lzxBuJMrbTviE7/RcsArLPJnEKSTg91HL/bvI9SWr464hj9KoRx6QqOReMhpiYZ pyM1ZdFmFFmXbA3nRelLG3JQevQgVuaPYUN3dnPquqi+a6zTxcdgyEiHuLcSlKFpHvBv pdlfoi0PmQ9t8GH3LArvmHT2shGLpSl7RdOI/5d0HXxHPvWtMbhNfjg4k/9bUI3+GE0+ VjX4DjBOtJ4aaZxw/9nF1+0gFROOJw1qN1EXDeod1HcByAQijy9UsUbcwUTLRhxN83+A Trx8AyWbqeElkDr4qBL95u3+H8hXaHwG6LzTIuTl5u8dHRnbogwwRL9YZuqn4vu2sJA2 qHcQ== 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=p6Bh35ZdvETCBOtNqCTD29LSCw6Qzhs8jEHyC+SK4Jc=; b=pt6kSoWAGPr+GqF8YJ+nG/jIeUjPxPA2JnR5aTIG6D2s+l/yUILSkZw7UJl3ZfS6xV GHrxpH0iZ1Kn3CdFMttWDux1VN1+RpW6X+2/yuaXwHt13fjoXeGFMFueE76K8AhFB446 qalxfv8rZjFXVOU/fjumRN0x6kUdBnKjt70bgvO0/gJddB+55L1Xz4rIF4Td+AldS5Wo BBP38J+QmF15nXjdvTCT6UqIrthKUkmFlO/PPoaRtFnCq/b1XnqnNlJEh8ImYUZZV6Gq uK+aU5KgTnlQ0za2mr3mNmcGNqe3BP9Ltas0RWgmt/fkV8uRNicTmAJw3CdkgoOg1fiZ 8MIg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q17si21369131pfc.198.2018.12.04.11.57.23; Tue, 04 Dec 2018 11:57:38 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726247AbeLDTzJ (ORCPT + 99 others); Tue, 4 Dec 2018 14:55:09 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:46548 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725874AbeLDTzI (ORCPT ); Tue, 4 Dec 2018 14:55:08 -0500 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id CF3D88093E; Tue, 4 Dec 2018 20:55:02 +0100 (CET) Date: Tue, 4 Dec 2018 20:55:05 +0100 From: Pavel Machek To: Linus Torvalds Cc: mhocko@kernel.org, Ingo Molnar , Oleg Nesterov , Linux List Kernel Mailing , rafael.j.wysocki@intel.com, chanho.min@lge.com, Thomas Gleixner , Peter Zijlstra Subject: Re: [PATCH] Revert "exec: make de_thread() freezable (was: Re: Linux 4.20-rc4) Message-ID: <20181204195505.GA28832@amd> References: <20181203123857.GS31738@dhcp22.suse.cz> <20181203131006.GA10054@amd> <20181203135351.GU31738@dhcp22.suse.cz> <20181203141459.GA14789@amd> <20181203141737.GY31738@dhcp22.suse.cz> <20181204090228.GC73770@gmail.com> <20181204091020.GD1286@dhcp22.suse.cz> <20181204093310.GE73770@gmail.com> <20181204095802.GF1286@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="x+6KMIRAuhnl3hBn" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue 2018-12-04 09:31:11, Linus Torvalds wrote: > On Tue, Dec 4, 2018 at 1:58 AM Michal Hocko wrote: > > > > AFAIU both suspend and hibernation require the system to enter quiescent > > state with no task potentially interfering with suspended devices. And > > in this particular case those de-thread-ed threads will certainly not > > interfere so silencing the lockdep sounds like a reasonable workaround. >=20 > I still think it would be better to simply not freeze killed user process= es. >=20 > We already have things like >=20 > if (test_tsk_thread_flag(p, TIF_MEMDIE)) > return false; >=20 > exactly because we do not want to freeze processes that are about to > die due to being killed. Very similar situation: we don't want to > freeze those processes, because doing so would halt them from freeing > the resources that may be needed for suspend or hibernate. >=20 > How about something like we set PF_NOFREEZE when we set PF_EXITING? At > that point we've pretty much turned into a kernel thread, no? I'd be careful about that. Exiting task needs to write to disk (space of unlinked but open files needs to be freed), so we can't just ignore them. And given that ptrace example (where it deadlocks w/o freezer anywhere nearby), I'd say attempt to simplify the locking should be made, first. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --x+6KMIRAuhnl3hBn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlwG25kACgkQMOfwapXb+vJ3PwCfa9L6ANtUic0o9b783bZZ+/ZO PasAn1mkg2Q9Gj4m3+G9iR7OVfHtMP3o =qkqc -----END PGP SIGNATURE----- --x+6KMIRAuhnl3hBn--