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 A675FC19F2A for ; Thu, 11 Aug 2022 11:43:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234948AbiHKLnJ (ORCPT ); Thu, 11 Aug 2022 07:43:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234420AbiHKLnG (ORCPT ); Thu, 11 Aug 2022 07:43:06 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A7C2910BB for ; Thu, 11 Aug 2022 04:43:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=44LNoOo+GlGFf4oFaGIyYBOTJarrYSp5y1KTEHFz0eM=; b=r89wHmeyVhIM3k79xQ6SZfxx7T W2E9mMt2CAxH6CAPSby6Y2Cf601fMCfbvmbKmFo+LmKtNvkRlbuyVwO0nK0Msaci0+msVSyh2Zo32 1eR+a8HrbgUuCgK/iKwFpMa98AFepQOReEDPXUgxJXe7CmHoIuwNgjVMvVjFrDN/LYUwgKyPOv9aT 16BVdsKXPWTL2YCYfvK4eP2+ICM63WbPUW7aq+0JI214NR0Yy15WVPGkVQQkh1gSFbf0GN2lrt/Fy 2IrEA6leBfz+P2NpHZxQ9pJx0HSKTbpn9aSWZh57mi1eEmXJtZNdgNBVR8cCz2iTxttdRd3uJ91CM rO88on+w==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1oM6aZ-000cTj-Hq; Thu, 11 Aug 2022 11:42:59 +0000 Date: Thu, 11 Aug 2022 12:42:59 +0100 From: Matthew Wilcox To: Hugh Dickins Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] mm/shmem: shmem_replace_page() remember NR_SHMEM Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 10, 2022 at 10:06:33PM -0700, Hugh Dickins wrote: > Elsewhere, NR_SHMEM is updated at the same time as shmem NR_FILE_PAGES; > but shmem_replace_page() was forgetting to do that - so NR_SHMEM stats > could grow too big or too small, in those unusual cases when it's used. > > Signed-off-by: Hugh Dickins Reviewed-by: Matthew Wilcox (Oracle) > --- > This is not terribly important, and will clash with one of Matthew's > 59 for 5.21; I don't mind if this gets delayed, and we just do it again > on top of his series later, or he fold the equivalent into his series; > but thought I'd better send it in as another fix to shmem_replace_page() > while that function is on our minds. Let's get this into 6.0 since it's a bugfix, and I'll rebase my patches for 6.1 on top of it.