From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5ECCBC77B70 for ; Fri, 14 Apr 2023 08:18:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230016AbjDNIS2 (ORCPT ); Fri, 14 Apr 2023 04:18:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229617AbjDNISY (ORCPT ); Fri, 14 Apr 2023 04:18:24 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C0D72D55; Fri, 14 Apr 2023 01:18:23 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 064131FD95; Fri, 14 Apr 2023 08:18:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1681460302; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=w/B9WAykUhqtQERmWAVFwFjJ06AW3T330rZwJKMeXcU=; b=G57bipcII+Kcb1q489f/nDfnJopWEYGW9tFRQPr2xS51mPKO8t0gfoiMFB9cbBqrV/VP4L GQjhWrz7Lkx7gZUmJLDbala2k9t5YJNDCUFm4bVwmlRUVIYbjDiJB+pKm9Nz+qcv/cy3ST qQvYC8kHNowQKvp+URpi84Um104m3p0= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id DC183139FC; Fri, 14 Apr 2023 08:18:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id YsoOM00MOWQMZAAAMHmgww (envelope-from ); Fri, 14 Apr 2023 08:18:21 +0000 Date: Fri, 14 Apr 2023 10:18:19 +0200 From: Michal Hocko To: Yosry Ahmed Cc: Andrew Morton , Alexander Viro , "Darrick J. Wong" , Christoph Lameter , David Rientjes , Joonsoo Kim , Vlastimil Babka , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, "Matthew Wilcox (Oracle)" , Miaohe Lin , David Hildenbrand , Johannes Weiner , Peter Xu , NeilBrown , Shakeel Butt , Yu Zhao , Dave Chinner , Tim Chen , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v6 3/3] mm: vmscan: refactor updating current->reclaim_state Message-ID: References: <20230413104034.1086717-1-yosryahmed@google.com> <20230413104034.1086717-4-yosryahmed@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230413104034.1086717-4-yosryahmed@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 13-04-23 10:40:34, Yosry Ahmed wrote: > During reclaim, we keep track of pages reclaimed from other means than > LRU-based reclaim through scan_control->reclaim_state->reclaimed_slab, > which we stash a pointer to in current task_struct. > > However, we keep track of more than just reclaimed slab pages through > this. We also use it for clean file pages dropped through pruned inodes, > and xfs buffer pages freed. Rename reclaimed_slab to reclaimed, and add > a helper function that wraps updating it through current, so that future > changes to this logic are contained within include/linux/swap.h. > > Signed-off-by: Yosry Ahmed Acked-by: Michal Hocko -- Michal Hocko SUSE Labs