Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp458241rwb; Thu, 11 Aug 2022 04:48:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR68/DToILX4jb/0U0aRJfrKtOm2vOkA1hih3kw5u4rVB0YV+JLoiDM5nv7jjYsGLelKl43W X-Received: by 2002:a17:902:a5c3:b0:170:d51c:a606 with SMTP id t3-20020a170902a5c300b00170d51ca606mr13921042plq.64.1660218539072; Thu, 11 Aug 2022 04:48:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660218539; cv=none; d=google.com; s=arc-20160816; b=ljLsZacAtG5aOMuN029H2EQXAXgArw/AiWQZe0BdkZEkFqGaFDBtW31DEWGe1ivURD or4brSLiddzWwVrWAee22omjZRURYpMmIQqLUYZhifk2mw7tGkxHtHofgE3/+1LoG7KY XQPefB1ja4e90th9cUMjNKJwbhJvMcTm8hQfXzgOZRZzAPtOZ6Dmv2FM34elZuIP/++T u8TYFRqVZcF55OO8tH8CMWhPGuOPQSpiVQQHXl37XZ3mt2McQ5HQcEy47BPURpdgq0xV HsMwUgI5v3gpYGRoAOu8Rh/jLItdIzKGGuEZ2SMk99RhRkLxCme5TA5QWvYFB2blLbMf WQtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=44LNoOo+GlGFf4oFaGIyYBOTJarrYSp5y1KTEHFz0eM=; b=qj0wXnXXEqjtbgVAgtj5LRP0enbIZIEjukadOf+njP/LMVqb3if72ayhKJ6ko0/72Y RI45qWqf+1A4JD1ihILRo5pwALhBw8hw9SEfTMfnxJ/BF0fND8QKlbvM/S6xueJ7gcr6 deUUqV+XUETUVxGNjl5b+/GNaDxW3fhVgKWlZjqXuYO17WP2nFRnKv58kH1qQyEPFtek J34ipX4JXQEu8gb1oL63II/77ldY2clzSlk5lhQVfvGoS55GiSSEOqTlbQPVqA4+O/Z2 nY4IbZax6ODIe2C53bpAy3mN2+qnfdg+MsSzCUlHdM6hjboogGVjGm5obxRQYePulu24 Uv5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=r89wHmey; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w20-20020a63fb54000000b00419a4c7521bsi4132983pgj.762.2022.08.11.04.48.41; Thu, 11 Aug 2022 04:48:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=r89wHmey; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234910AbiHKLnI (ORCPT + 99 others); Thu, 11 Aug 2022 07:43:08 -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: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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.