From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C62F713D503 for ; Fri, 17 Apr 2026 07:04:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776409476; cv=none; b=JpLYaVHE/svHihBZyTX5WdTmH0BZBYcTrzLB6WcdDJl6eeDc/+UBDoYMG1Z1fSSELYJNbWFDVpbj9zUFjZ7TRNXXqQtDEc/Fftr38xTJN0OH1cg+gyyiiTLmgKKxdJvUk60S//xZlY0klRTCxXBg01aRw6ZGMJTtcjiz2x2yziE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776409476; c=relaxed/simple; bh=aioSpx00VSvDIXs8jt2svFLJJ5TYh4JYqRKpXS4T4fE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AwBA3RGc84joz/3HQNRzb3XuI0zMyy9wM3hcV4VK/kSJu98cb6KvK82h6pvDJIKM6oiAMfWs7GJlrt+GdrpZPpnDDzNgh6GGHAS0tEWpz0LrjxE98zOVTbHcn2fTucyoSsA0hmbvrTy6pep+opQ7l6NIuGMVKz0kMaShZbJak+g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=CwiJMAtk; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="CwiJMAtk" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-488b0046078so2946105e9.1 for ; Fri, 17 Apr 2026 00:04:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1776409473; x=1777014273; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=wFOEVE0hfa2qcWI+N130w2OV805O19ENrrl1tfur9Jw=; b=CwiJMAtk8cmQsr/mKw3fnxjZKo85nJEjoPk/mgiUKJ3ThQTcy5/NP88eLJkkPdfNQb 7kZmkIUM7RwxhqiYqHV3fUUrEjisPUJgg+2gxb+vzh1uENg8fcbZwF91DA4aZpG/esSe DWYQc2zcTo8Pv1WWpkWwKZc24X8feM7eVIcLA3q1CbdDuu56yNuHREIV44OVO3uHVk/P i9p03GhvZm+hs+DT9gqd0KKwR8tkGrmeEpPH6kv6qL2CY1YRdy89iOXRKKxZ19sFRC3Y Lx+OQ1xxKb7W52pSNtGI/dZ/xaT/0Or1eO/dm6mqMo015e+8JviHRoYyWshPpKhyHzz/ L7MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776409473; x=1777014273; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wFOEVE0hfa2qcWI+N130w2OV805O19ENrrl1tfur9Jw=; b=nCWyajgttfq8SGx2p9rkjSijqx2EPnXhOe2PkTalQ29KSEPDoIUFCetIaBwalvOPkb Epi4LWAsYty08GJPgPHvt0j78YzP6vEoh635xUThz5XRnwX6aymmErW5RU9a7uF/RUAb GCabqKCPDqEkCHGfe/3FOa02/TRrqmVDMXQTKpVoNP1TMarP7RaCjT0PzOSrjbMBiPQX 1+tFJ/rpanrHFmoZnLP4Mglr4VIEoj/14vsK0Z7Y5lMijF/XjK4FsmXM4PkTpirT4bJQ DOAclZgVvNM+EhR6J/wuJSmf/Pd+hImccY6qO1/W831MhcGdLcutLSgTMxAsjvE+ZptF /z5g== X-Forwarded-Encrypted: i=1; AFNElJ8NnVn8UxkOztlxA9BGfp73Wnl/WqgJoidYbayrAszFz1k+qcql1cPPc5c4exxjaNIDfrXkguVctpHM2v4=@vger.kernel.org X-Gm-Message-State: AOJu0YywyihqoM3OWNSTW0u6gOmVT9ib8+Xl/knD8gxUSwin/etIT/pf n15onE/h9PeTXeVkrSt7icbwCDo9T+F60Z5CSu1gXv76mzkkGdtT7+ASZF0NnNnHqG4= X-Gm-Gg: AeBDiesH490iy6eGlqYehPM/+BdJAzvbMXkThKgYJj4/jSFirNfYu1xOuo9EaAks481 TKBzUoXNo7mugYELYye3PGdwuXByZr6X9Fd3sntmjKMlGAvXMA5KTsuBoKtYRIElWes3+Ixzodd oVkiJeZxtrd8qDNQSKGiYcWr4ORavTDA5Fx42eMKQ3L1VnOEaueE4oVnSIqGusH6TVlULWf0XlK ua60NiTaYW/U3wRRApf41uOG5I5HMbFqFNWBx/fqMG3wX+Yc/nStU0EMgjikRhd8v8IadTfUERo rkd5EhJBWzXTIfFnRPLmJLd0fdSoMgZmGDbYzAJnt2wKKClpct+ptx43fA64+hYaAdMhwq0NiYE V3h+8RlC3/gMY3VLkYCobPp/Bq1Hp+DgoppCEcBSSF2tqX5cYtj5cdQlDqUXPD2zq7mlcZZ/58A f8VvlUXc2286d4rpC9fSwOKBpwG4Yu/vZhMXAlihFG53959+WLzQ2SRoTK2A== X-Received: by 2002:a05:600c:4515:b0:488:a4d6:69ad with SMTP id 5b1f17b1804b1-488fb790b84mr21885355e9.27.1776409473089; Fri, 17 Apr 2026 00:04:33 -0700 (PDT) Received: from localhost (109-81-20-115.rct.o2.cz. [109.81.20.115]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488fb762f56sm10333105e9.15.2026.04.17.00.04.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Apr 2026 00:04:32 -0700 (PDT) Date: Fri, 17 Apr 2026 09:04:31 +0200 From: Michal Hocko To: Minchan Kim Cc: Christian Brauner , akpm@linux-foundation.org, david@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, surenb@google.com, timmurray@google.com Subject: Re: [RFC 3/3] mm: process_mrelease: introduce PROCESS_MRELEASE_REAP_KILL flag Message-ID: References: <20260413223948.556351-1-minchan@kernel.org> <20260413223948.556351-4-minchan@kernel.org> <20260416-planktont-abwinken-b9499483b939@brauner> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu 16-04-26 23:30:09, Minchan Kim wrote: > If I send the SIGKILL first to satisfy the process_mrelease() requirement, > we immediately run into the scheduling race condition where the victim can > enter the exit path before the reaper can set the flag. Why don't you just grab the mm before you send the signal and then continue with reaping? You just want to avoid a race where the victim manages to process fatal signal, start its exit path and mrelease path losing that race so you rely on the exit path, right? -- Michal Hocko SUSE Labs