Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp222302lqp; Tue, 11 Jun 2024 22:10:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVA19vW8S61auhzOjiVzw+5SKmWxCZbl+NAYNXURjqAfwO1gXgywMta1UbktXPYvacFBzXB2jUD827Bcec9Votl9hwaowChIIIUJj6UBg== X-Google-Smtp-Source: AGHT+IHjYKHRWx3Y7Xx+zu0vNxwM4wrsq6E/fEGxi2gEE3N0If5sVbTj+fYjUVUn2PXQTC72AfwV X-Received: by 2002:a05:622a:1349:b0:440:5a86:ef77 with SMTP id d75a77b69052e-44159b416b5mr18125341cf.25.1718169053752; Tue, 11 Jun 2024 22:10:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718169053; cv=pass; d=google.com; s=arc-20160816; b=YVhqu0cD63rIf1yYhQmxIt9aFKsSSDEg9/MEvowQ8qxY6ItVswbGipDb0cxylhw3y4 Zl1kulk0E7+1QiH566AjZcdP3s+LZjG8WieWsN3C9JWQq/rqKVMYeDtehd6HY0xQtiV1 wXVOwsFqEyWGwdbRbQlceIEBcyzzs2fhIG1Ktb+/NM1hV7zfXtA6l3OQO8lyYqx3Ig1r CNVNFizslGFB6dUdPJEUBwfmz4vr+ylmzBu0h31Xgb8gm7cmRjecf2M1nm138luOsQYm wmAFoz9WCwfQS6ZlhlcFKxsTNnFxUKF2p4+kVqEyhcirqRjWTyL1NrHZ2FyIXq5ko+CI G4sw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:subject:cc:to:from:date:dkim-signature; bh=gxIuQyI+KqEjqXSPbt+rLQHHedM6hADL5yUtu3q/GcU=; fh=94h/qNEpJLCMk3KGl9Ynr++CO6FsnEPoPobr6CPvuB4=; b=PA/zr6KqMVKBA4hOEk50IXMhNTEAy6fuO5KIGNDQvIy0tlF5zmevUqd/58V1cZH43L /9GI1ZyK1zHWMBgYtfjFGo+5DACcb/o+3RxspOG1YHA0RMV87KvD4FtcopTuFFEdjA7B EfgasCZw8m8H5yiTJ+rCaHd6bLTf/D7IiBNWC8lSR051vdZM3BX7C4WhZwbcOSkKcXVG oTvqMAfrS8ncmUNoiSWPu/Rx+mtFT2OpW42ox3ZyHU1b3iHwmbErcPHy/Y6mTutnJRDM gTd8fsCdIUv5QZme6Swe5twmwIv4Ug/+FeTQxwYYEmPL0Ko+qHkPlQsnPLOpI7orkUoP TInA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ZFZBYd49; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-210935-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210935-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-4411c44b1ccsi52599391cf.514.2024.06.11.22.10.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 22:10:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210935-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ZFZBYd49; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-210935-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210935-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 72E551C23294 for ; Wed, 12 Jun 2024 05:10:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 737E831A83; Wed, 12 Jun 2024 05:10:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ZFZBYd49" Received: from mail-oa1-f49.google.com (mail-oa1-f49.google.com [209.85.160.49]) (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 3CF4928DD1 for ; Wed, 12 Jun 2024 05:10:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718169048; cv=none; b=tDy8yt3ynXinzq44W2AkAAlM5CMSYNKywDtwER4YIredcke3FbdqhOQkzNkusjxGklT15/yKscLDlAPSJwDPnmB7uA4CgvSynIw84jHpv/1Vmju+lXupEy7bVVSq8ycjniAFiDDLlOADpF0VbeY0M3oP3oXs0j1dxMp477RCZk4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718169048; c=relaxed/simple; bh=E3FbBH6yhR85/lFWGiidknlpDoPTLw5NjmfksYFNlNg=; h=Date:From:To:cc:Subject:Message-ID:MIME-Version:Content-Type; b=g+WnkKIr9oFNsH6F5Ow7MPPNz/tf140XZYahegH80Hy7ykEPrxQe7xFI7VPfYaovHa+ScvTm93+yEGII4KuY2oTNkPqzTMpgg7cYAU8pB2w9P2fr8MayPnx6smJ8ufiuObEzRvPJdNpQ6IoeWvYTPOUSJdtbKW2p1SaAXtsAmj0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=ZFZBYd49; arc=none smtp.client-ip=209.85.160.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-oa1-f49.google.com with SMTP id 586e51a60fabf-254a370e7a4so270169fac.1 for ; Tue, 11 Jun 2024 22:10:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1718169046; x=1718773846; darn=vger.kernel.org; h=mime-version:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=gxIuQyI+KqEjqXSPbt+rLQHHedM6hADL5yUtu3q/GcU=; b=ZFZBYd49bt1dHw2Gsb9WuKhT7znRb/HLJV7vHC0SVl/8q6lz/sMy3RzyE/utTscdBw qJ8oBSrXSqYLmzp01Wow3VzB/hlHScb4txX8NWk+3HwxEW8PLAy1lg5DEXh/PZddc5kj v8Wbj3hePOemvdz3YCDViRH5Oi7f0T9puGmLRoLxV69OB80PgmWnEmVtkvmoj8ipfl36 bgVRW/sfEWvnUrlCb7Phj8P0HN+YrlpQxmn89kixOUDVDMAlRfBkiU0sIasMGLzWgxAk snmTIDiuv0SJ257PApSEsLJ4n+EmqeVGFp8BL8p7t126xtExzlHPFyFp6liJcyes3X/2 o/ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718169046; x=1718773846; h=mime-version:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=gxIuQyI+KqEjqXSPbt+rLQHHedM6hADL5yUtu3q/GcU=; b=B+0hgMwcy5p3Krxdw5jLRWZfNn3V/YC9TlLLB7RirNpVf7ybBCG1mEWV4lpGlg8hZD PClIv19rhMaGdK0VdVZa76oUfkNVEy3FCE2UFNqB7rF++9XQtw/N/HyYkGf7VZhZQMuK JpJ24hML9EzMcDcc5UMAMIXZ80iv+y0A8K1tkkV/HsDLnYU02bySdfe+JQiqia8/4XbR /bm9QngQfBX/LoFQqAdAHj0jjIUh8LvEM2ax775zf+U9SRiirIk42LL9U1S9PfkHbWWL KA3/SQemtaNwEuHay1KnnA9bn32q8E8+GVovY+mMQtABpQbDahEuCSyXtpYtENssB3Oy /5Ng== X-Forwarded-Encrypted: i=1; AJvYcCVYt/qgxy1RFvD93IrYeDF01m49Vm7kgFWjIO6K2SHkKlvNAcitU3WdUxCP7TS5ZLcpamslu0m2a1xSMmn/5T3iPRekyC7DLGzqhvbS X-Gm-Message-State: AOJu0YzAqdXExOSOcECqg58RlALDSA4/rGNL6IL2iaJytTeHT3p7YC1i seAB14rjuAaBv33Yj3mVvNMDN5Nr15LFQbRat2dw6gxKIXdIV/hHwFOtUms/wg== X-Received: by 2002:a05:6870:968f:b0:250:3c9d:fd20 with SMTP id 586e51a60fabf-255131599d8mr469507fac.0.1718169046206; Tue, 11 Jun 2024 22:10:46 -0700 (PDT) Received: from darker.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-254a8de199asm1855570fac.22.2024.06.11.22.10.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 22:10:45 -0700 (PDT) Date: Tue, 11 Jun 2024 22:10:43 -0700 (PDT) From: Hugh Dickins To: Andrew Morton cc: Yosry Ahmed , David Hildenbrand , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH unstable] mm: rmap: abstract updating per-node and per-memcg stats fix Message-ID: <49914517-dfc7-e784-fde0-0e08fafbecc2@google.com> 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 /proc/meminfo is showing ridiculously large numbers on some lines: __folio_remove_rmap()'s __folio_mod_stat() should be subtracting! Signed-off-by: Hugh Dickins --- A fix for folding into mm-unstable, not needed for 6.10-rc. mm/rmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/rmap.c +++ b/mm/rmap.c @@ -1567,7 +1567,7 @@ static __always_inline void __folio_remove_rmap(struct folio *folio, list_empty(&folio->_deferred_list)) deferred_split_folio(folio); } - __folio_mod_stat(folio, nr, nr_pmdmapped); + __folio_mod_stat(folio, -nr, -nr_pmdmapped); /* * It would be tidy to reset folio_test_anon mapping when fully -- 2.35.3