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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2C6AC19F2A for ; Thu, 11 Aug 2022 11:43:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 03B876B0073; Thu, 11 Aug 2022 07:43:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F2CD86B0074; Thu, 11 Aug 2022 07:43:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DF4C28E0001; Thu, 11 Aug 2022 07:43:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id CB9BA6B0073 for ; Thu, 11 Aug 2022 07:43:05 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 8C6BA141616 for ; Thu, 11 Aug 2022 11:43:05 +0000 (UTC) X-FDA: 79787125530.29.1AE8EEF Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf27.hostedemail.com (Postfix) with ESMTP id 81FD040073 for ; Thu, 11 Aug 2022 11:43:03 +0000 (UTC) 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: ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1660218185; a=rsa-sha256; cv=none; b=RmAwdsaPlZLNpg+coNqYUyf/dp/gxvxJmejxK6mXgF4QxSJ0BWMP4lVs6FQQUu8shlBKrN yMEk4bkYzuweldVxErxF9s5LAWewjnqIY5eUO/bsxFybim9RtSOjsfiLc5woMiKB+17Iaa J4QO0vu4UznOjC7Y5Kbf77EOD3CNnRg= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=r89wHmey; dmarc=none; spf=none (imf27.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1660218185; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=44LNoOo+GlGFf4oFaGIyYBOTJarrYSp5y1KTEHFz0eM=; b=Um9dNaR2xlOQ9UBbSgV1sIB6KYBsw//zWHAHKBhIjk4x1PzuRBmcYa4ILYtEp1k85JgFs3 xf1wXfLW7W6TcUy8fPXtWp4kdsMEXNLFIwSTl4l5Bjw0GGxZMK7jpz7N+Th7YKiEoi9m0Q 90z9HJ4HZQbu5m1qy+wu00+0uJpCbiI= X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 81FD040073 Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=r89wHmey; dmarc=none; spf=none (imf27.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Rspam-User: X-Stat-Signature: ysrhe16cuk9pjnui4y6b8pfm7yu9pnkc X-HE-Tag: 1660218183-264612 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.