From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) (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 F348125A2DA; Thu, 7 Aug 2025 12:14:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=124.126.103.232 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754568899; cv=none; b=CODlAvgjGQjlkGbGpk1KhmKCrS7bOmzuSJIukdmpVFFM+xxH4wXYJO5C9TdP1s+zuHCYcySVbiMRLOdpjFCv58m2Z71LOBlQzBzzDPBvy/k9eXZkXN3f8DcdnMjG64FExaA3hDn6gNWZ/LdAqCHW2gW73HyCJy4T+qKZaciZvYo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754568899; c=relaxed/simple; bh=+D+4U6y8lDfJCNvLyRYrz4+ASP1ZVSoxECednpKOg4w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=NzeUjMfxXb12O5A9FtRnCHmqQWjfPtkXygF1IiIwcuVMH5QQjPDwweB6Jfz1pGiyoeX+RaQKCqvRH41s1efLEoKjqpjEEZRhmDcwUUbGxYUXN2QcstzM7Ga62GGPuHIpp26nsawnAruIeQtvw7WWf95GG66iQTqjEKfoetC218k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn; spf=pass smtp.mailfrom=kylinos.cn; arc=none smtp.client-ip=124.126.103.232 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kylinos.cn X-UUID: 1eaed2cc738811f0b29709d653e92f7d-20250807 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.45,REQID:c0d1405b-f86a-4b76-964c-fd303404ddc2,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:6493067,CLOUDID:bd05ea79dd1398b27cc4daca19b4d0dc,BulkI D:nil,BulkQuantity:0,Recheck:0,SF:81|82|102,TC:nil,Content:0|50,EDM:-3,IP: nil,URL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,L ES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: 1eaed2cc738811f0b29709d653e92f7d-20250807 Received: from mail.kylinos.cn [(10.44.16.175)] by mailgw.kylinos.cn (envelope-from ) (Generic MTA) with ESMTP id 1109964960; Thu, 07 Aug 2025 20:14:51 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id 4513CE01A758; Thu, 7 Aug 2025 20:14:51 +0800 (CST) X-ns-mid: postfix-689498BB-10757666 Received: from localhost.localdomain (unknown [172.25.120.24]) by mail.kylinos.cn (NSMail) with ESMTPA id B9D61E0000B0; Thu, 7 Aug 2025 20:14:47 +0800 (CST) From: Zihuan Zhang To: "Rafael J . Wysocki" , Peter Zijlstra , Oleg Nesterov , David Hildenbrand , Michal Hocko , Jonathan Corbet Cc: 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, Zihuan Zhang Subject: [RFC PATCH v1 4/9] freezer: Set default freeze priority for userspace tasks Date: Thu, 7 Aug 2025 20:14:13 +0800 Message-Id: <20250807121418.139765-5-zhangzihuan@kylinos.cn> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250807121418.139765-1-zhangzihuan@kylinos.cn> References: <20250807121418.139765-1-zhangzihuan@kylinos.cn> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable The freezer framework now supports per-task freeze priorities. To ensure consistent behavior, this patch assigns a default freeze priority (FREEZE_PRIORITY_NORMAL) to all newly created userspace tasks. This helps maintain deterministic freezing order and prepares the ground for future enhancements based on priority-aware freezing logic. Kernel threads are not affected by this change, since they are excluded. Signed-off-by: Zihuan Zhang --- kernel/fork.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/fork.c b/kernel/fork.c index 9ce93fd20f82..04af5390af25 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -2422,6 +2422,7 @@ __latent_entropy struct task_struct *copy_process( =20 copy_oom_score_adj(clone_flags, p); =20 + freeze_set_default_priority(p, FREEZE_PRIORITY_NORMAL); return p; =20 bad_fork_core_free: --=20 2.25.1