From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25B5F21B9DB for ; Mon, 11 Aug 2025 09:33:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754904836; cv=none; b=eCe919gqwwM26hwtV7GY17IRhl3vpnaH9XY9oEM4yh5LF9p7nHn4lxLJ8QeuUwisaqDDmhcmExlu02jtUnLNZlJZrihnj8PZSMh8avKH9jFQnb0xcZ6joPHb6G9vrSqgMpYIobyqasiGl6MXI8vp68HAUjvBqqerQAwBepinEt8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754904836; c=relaxed/simple; bh=J1D/09r3N3DLDHsiA721RlvHu+0kUr0iq+BYE5etANU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gzCOpTG+DqfO7wCA4n+meT8vmbE7brAQKnx/VTXdkgEDbbazKVbq5xiesnqOF9we7MQ3Pj/QVc1M/QgjRFiFmjv2XjUnpSMuIQNjSL2cml9m76JaCljaIRH2VJpA863eYdfm6aHfWpRYICe5ndkAyk+RIaiCciYk7xSGi1lkuF8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=fail smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=KYnPvZKu; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KYnPvZKu" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1754904834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HiJMfJlrRsamODe6gnkp4xuGLE6+B0lz0Dbma9PtWd8=; b=KYnPvZKuyfnjne5F9uCsPrsuKj4y3OfTVkqGUTVfywJGyU3Tqm3PLsIA9LhhCGSa5BmRPM 6VzKtE4hBxao92n9l6/fDMwNA08evA2ZRqKytFDv+VfjDaxqF0R6dNc1qjcmeuwO7h9zta +a71n0tIVb/+K4UQfvVmtIWiir2Vr4Y= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-567-1rGCXW-fMce3E-ZR8gb95A-1; Mon, 11 Aug 2025 05:33:50 -0400 X-MC-Unique: 1rGCXW-fMce3E-ZR8gb95A-1 X-Mimecast-MFC-AGG-ID: 1rGCXW-fMce3E-ZR8gb95A_1754904826 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DE1DE1800352; Mon, 11 Aug 2025 09:33:43 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.225.234]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id 9F6FA19560AD; Mon, 11 Aug 2025 09:33:29 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Mon, 11 Aug 2025 11:32:31 +0200 (CEST) Date: Mon, 11 Aug 2025 11:32:16 +0200 From: Oleg Nesterov To: Zihuan Zhang Cc: "Rafael J . Wysocki" , Peter Zijlstra , David Hildenbrand , Michal Hocko , Jonathan Corbet , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , len brown , pavel machek , Kees Cook , Andrew Morton , Lorenzo Stoakes , "Liam R . Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Catalin Marinas , Nico Pache , xu xin , wangfushuai , Andrii Nakryiko , Christian Brauner , Thomas Gleixner , Jeff Layton , Al Viro , Adrian Ratiu , linux-pm@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v1 5/9] freezer: set default freeze priority for PF_SUSPEND_TASK processes Message-ID: <20250811093216.GB11928@redhat.com> References: <20250807121418.139765-1-zhangzihuan@kylinos.cn> <20250807121418.139765-6-zhangzihuan@kylinos.cn> <20250808143943.GB21685@redhat.com> <0754e3e3-9c47-47d5-81d9-4574e5b413bc@kylinos.cn> Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <0754e3e3-9c47-47d5-81d9-4574e5b413bc@kylinos.cn> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 On 08/11, Zihuan Zhang wrote: > > 在 2025/8/8 22:39, Oleg Nesterov 写道: > >On 08/07, Zihuan Zhang wrote: > >>--- a/kernel/power/process.c > >>+++ b/kernel/power/process.c > >>@@ -147,6 +147,7 @@ int freeze_processes(void) > >> > >> pm_wakeup_clear(0); > >> pm_freezing = true; > >>+ freeze_set_default_priority(current, FREEZE_PRIORITY_NEVER); > >But why? > > > >Again, freeze_task() will return false anyway, this process is > >PF_SUSPEND_TASK. > > I  think there is resaon put it here. For example, systemd-sleep is a > user-space process that executes the suspend flow. > >  If we don’t set its freeze priority explicitly, our current code may end up > with this user process being the last one that cannot freeze. How so? sorry I don't follow. Oleg.