From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta0.migadu.com (out-123.mta0.migadu.com [91.218.175.123]) (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 5AB6E4A92C0 for ; Wed, 2 Sep 2026 15:36:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.123 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788363408; cv=none; b=SRndzSmX+v7R+fYfQhL6+QwKSgDKC9we6A3bdGW+OkdMaNeMaXyfsxFtYhPXdRF5QhFNRpuQRmg4DzmHdl9z5kiOU7gD1ZBtF2e7kwYXbPi/QEG/i/HwLB4uW2AwK61AafU9niKvSp/+tO+WIVKG6SM/8u6z0vtvzvu/WqjDo84= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788363408; c=relaxed/simple; bh=nQsYSlZTDghUio3blhbx1zI+jv+vMKfhKPaFPZydeaw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oHVkz9l6cMiSKKNZdaPBU741LVZCXCdDFKjbzgH1nslyuy3zWeVDhO1au8bdkeszdGmKn8XL0OsvH9LnorxzwlAhHu60kahBQIVJWnAFxYzUem87VXJIFbjY2J0mGFp/3PJ3YgMXLMXA4Zt4w2sdY+kZaiatgGQl0kt0KiXpGF0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=oc+mui4m; arc=none smtp.client-ip=91.218.175.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="oc+mui4m" X-Envelope-To: linux-fsdevel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=nQsYSlZTDghUio3blhbx1zI+jv+vMKfhKPaFPZydeaw=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1788363395; v=1; x=1788968195; b=oc+mui4mfm5rkivU1QIe2HncQpjw+MEoitTI9PcMQigNEVtPvlvaXTCZbyyw54KEovPfWuYr FMDVbSteUoEMvG6UyNNT9oZ0023l36gQ0Epc/YKy4GNGpHBUuwoIHtX5Cou73RvtqEADC0Z3sC+ bmevzRE8s1I8UoJK1O4hDGvo= X-Envelope-To: linux-fsdevel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 0dc618aa284fdb5a; Wed, 02 Sep 2026 15:36:35 +0000 X-Mizu-Trace-ID: 0dc618aa284fdb5a X-Migadu-Flow: FLOW_OUT Date: Wed, 2 Sep 2026 08:36:30 -0700 From: Shakeel Butt To: Kefeng Wang Cc: brauner@kernel.org, djwong@kernel.org, cem@kernel.org, akpm@linux-foundation.org, vbabka@kernel.org, surenb@google.com, mhocko@suse.com, brendan.jackman@linux.dev, hannes@cmpxchg.org, ziy@nvidia.com, david@kernel.org, qi.zheng@linux.dev, ljs@kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 3/4] mm: replace PF_KSWAPD flag with kthread_func() check Message-ID: References: <20260902131653.1338227-1-wangkefeng.wang@huawei.com> <20260902131653.1338227-4-wangkefeng.wang@huawei.com> Precedence: bulk X-Mailing-List: linux-fsdevel@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: <20260902131653.1338227-4-wangkefeng.wang@huawei.com> On Wed, Sep 02, 2026 at 09:16:52PM +0800, Kefeng Wang wrote: > The preceding commits removed the last consumer that propagated > PF_KSWAPD beyond kswapd itself (XFS btree split worker inheritance). > The only remaining setter of PF_KSWAPD is kswapd(), and every > current_is_kswapd() caller only needs to check whether the current > task *is* the kswapd thread, not whether it inherited the flag. > > Replace the flag-based test with kthread_func(current) == kswapd, > freeing the 0x00020000 PF flag bit. > > Signed-off-by: Kefeng Wang Acked-by: Shakeel Butt