From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) (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 BDBFD31B100 for ; Fri, 29 May 2026 13:42:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780062131; cv=none; b=UgdIo78ibUl8KvhJOWcNLzhrC5a5tnyAW/tGje+WC31LjgdhWNTeStTT28eRjOLF28cEuv3f1JKr9037Xh9NOwzbKKeW1GdqyONG/fkzyF+Y22IpseUfM7MOjiT42grKsMN+f7xeFNOXNSOOBbvGFzbKJMq2c/kRflJqoMRjbT0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780062131; c=relaxed/simple; bh=7FQy1qlhL+joqSWk3OaqyFYPhh8jfv0FC6KwZ1gYfF0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LvP7Vj32OO+QyiJ14xH8XZ2JQr9qMtNJgQ/sIM9Ye5EpTZCYWg3pt6TCB0U0CZdLR394yHoIO15WyXmx/Su/oujNms8dm079kSVW7qfMettJjn1nJdQWRtk9ZiQOvDKKmXkli6oWXamiUkVeERCc0CyaNjxM1jEa8pUBvO8Qedo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org; spf=pass smtp.mailfrom=cmpxchg.org; dkim=pass (2048-bit key) header.d=cmpxchg.org header.i=@cmpxchg.org header.b=nbQINirj; arc=none smtp.client-ip=209.85.222.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmpxchg.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg.org header.i=@cmpxchg.org header.b="nbQINirj" Received: by mail-qk1-f180.google.com with SMTP id af79cd13be357-90fe17c157aso1473021585a.0 for ; Fri, 29 May 2026 06:42:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg.org; s=google; t=1780062127; x=1780666927; 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=gpbakxeVUDkW3G1QkEPqtCqf9wGLZXcu/9D8TGYnFkc=; b=nbQINirjU2OkleMLIq16EL9/y30sgCL5X3VgE/4LFGXOb5Bme77iR1jlROA5NcsLDH WKGyVm7UPZK6kH2HNoUBypAWNid54hiWfLQBeVcwR+iWZPvO8jG7AwwCU7HJEmeUIS3n oxVGNUsVjLV3jkKfAm42fmR++qGlzYMKKnvvONq6HSkivdW+G8+wqJ36fBuFDmXKYKTR DVJxmfW6IByplPGuFZA3u1lQXg/9+6bs23HXU5Nh1gVuMrodJdWt5omgGdusA6YjfJDk UwpHjkS3MiS3bnj16lu0OiyqCayRr2Xk9ir8c2iMJPqSwh5p23D3+4zc4opns77uobA7 uChA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780062127; x=1780666927; 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=gpbakxeVUDkW3G1QkEPqtCqf9wGLZXcu/9D8TGYnFkc=; b=cmcnLCV8+/IxvxyVhUj1FEERhTSXJJ/mPEn+nbF8Sg11ZcHiNqnRCEByzqvHUOL8z8 G86sBviOP5omiF3dj+QgmkVA/ZZcojcu4ZTemNXA4EC0fDdXrnegBzjWxWY2NiyBXA8Y 2did7dWzAWSNQsizGmgoElrXCJ1FLDJvDvqIao7JnF4PG4CbLdyHIoB4JTC6w0o9+xU7 GfEZbyr1qMBX7nRAG/niLKlsmmkeo2DwNuZKVngSpUtwue7HxW/0LxZFKhAA0pkSKtKP ixkYeShJRuntnsyIOF+Ee3vOQXTrSehMcjWMHpa1MqiLoLfplRJXRIHpG+uo8GvhXMqG QZjw== X-Forwarded-Encrypted: i=1; AFNElJ+1KOX9DHjDA9Ck6kjCvCPQA4S9HPo2VWvjG1hgSDGivMDm9LqUBu0b+8kdBmQTFleh/3uy1+o2nSAg9vs=@vger.kernel.org X-Gm-Message-State: AOJu0Yx5k69HRGmvxxZeKlroOBq6kMRu+0eEYuzODoagkL2ImoNc5i1x uXlgLzmtuSYBGPwE+lmjh1064PuzJEZTN8phz92bJgDheRgiqH5N/XuDHyU1O6Ouzdo= X-Gm-Gg: Acq92OHpo6uJGWLWPkzjt7WaW4sJPgSDvFqESRyRB1yv0pfueNVs01z6mcGa9hX32O9 a/cWCEn4Jo/MX8K3HaOQf2hUW8N3j9/feDshmaw8sDC91s9ZbbjYmDT8/FE0uHo+rp0W8LCMZl1 H1DdSdEExn1WG+hHsDFJlYNh7mgAGk9/vOXT27mNlADwEkTdFXWbSTfoOqxcVIKVgqvyNotksTQ ruoD31HthfQExZwnBr3LKUk8DWsHoFistJ17Xpj68P2JSitWOJnBG51Ewgm5Aqg5ziHqp5Xr7QL PQvg4BQxQuXv8aFPkq1guvfd+NZtrQomr79y21sPMTnzatDQKy6oRivpX4p2UGmgjOaVKkWPpe3 rDozRqdyQzzroM+gwtPx+EtuxbxVNGZjY6AuYxGfUViF8BYMBmf/bsQUex2n5NYH3hwTCrp7ZwQ gZDVqqAHnwj9tBeo1N1NfvGU5KS4sYoH7dyJVOfymxXyQ= X-Received: by 2002:a05:620a:6f0d:b0:900:8024:4f9f with SMTP id af79cd13be357-9152ff63cfcmr375008985a.60.1780062126522; Fri, 29 May 2026 06:42:06 -0700 (PDT) Received: from localhost ([2603:7001:f100:500:365a:60ff:fe62:ff29]) by smtp.gmail.com with ESMTPSA id af79cd13be357-9153265d794sm185888785a.47.2026.05.29.06.42.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2026 06:42:05 -0700 (PDT) Date: Fri, 29 May 2026 09:42:02 -0400 From: Johannes Weiner To: Wei Yang Cc: Andrew Morton , David Hildenbrand , Lorenzo Stoakes , Shakeel Butt , Michal Hocko , Dave Chinner , Roman Gushchin , Muchun Song , Qi Zheng , Yosry Ahmed , Zi Yan , "Liam R . Howlett" , Usama Arif , Kiryl Shutsemau , Vlastimil Babka , Kairui Song , Mikhail Zaslonko , Vasily Gorbik , Baolin Wang , Barry Song , Dev Jain , Lance Yang , Nico Pache , Ryan Roberts , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 5/9] mm: list_lru: deduplicate lock_list_lru() Message-ID: References: <20260527204757.2544958-1-hannes@cmpxchg.org> <20260527204757.2544958-6-hannes@cmpxchg.org> <20260529095628.nagjdy3f24z6qjtk@master> 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: <20260529095628.nagjdy3f24z6qjtk@master> On Fri, May 29, 2026 at 09:56:28AM +0000, Wei Yang wrote: > On Wed, May 27, 2026 at 04:45:12PM -0400, Johannes Weiner wrote: > >The MEMCG and !MEMCG paths have the same pattern. Share the code. > > > >Reviewed-by: David Hildenbrand (Arm) > >Acked-by: Shakeel Butt > >Reviewed-by: Lorenzo Stoakes (Oracle) > >Signed-off-by: Johannes Weiner > >Reviewed-by: Liam R. Howlett (Oracle) > >--- > > mm/list_lru.c | 21 +++++++++------------ > > 1 file changed, 9 insertions(+), 12 deletions(-) > > > >diff --git a/mm/list_lru.c b/mm/list_lru.c > >index 7d0523e44010..fdb3fe2ea64f 100644 > >--- a/mm/list_lru.c > >+++ b/mm/list_lru.c > >@@ -15,6 +15,14 @@ > > #include "slab.h" > > #include "internal.h" > > Hi, Johannes > > One very tiny nit below. > > > > >+static inline void lock_list_lru(struct list_lru_one *l, bool irq) > > Here we use @irq. > > >+{ > >+ if (irq) > >+ spin_lock_irq(&l->lock); > >+ else > >+ spin_lock(&l->lock); > >+} > >+ > > static inline void unlock_list_lru(struct list_lru_one *l, bool irq_off) > > Here we use @irq_off. > > Do you think it would be nicer to unify the parameter name? Yes, I think it would be nicer. Note that I inherited this - we had irq on the lock and irq_off on the unlock before already. I didn't want to mix even more yak shaving prep patches into this series. Mind sending a follow-up patch on top of mm-unstable?