Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp232732rdb; Sat, 30 Sep 2023 02:15:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF4nUFmq0+Mx40wRB7mBKEpJJrqfunvmCqUnU5va19NXGSz1RYRdUi/ccG3nu8jgdDcKqcu X-Received: by 2002:a05:6300:808c:b0:15d:7ac9:447a with SMTP id ap12-20020a056300808c00b0015d7ac9447amr5671362pzc.52.1696065329216; Sat, 30 Sep 2023 02:15:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696065329; cv=none; d=google.com; s=arc-20160816; b=glvnvPa2BaSBuBPDRONYWRr2jYe64wFECo/VmKuXpDqgedKffJxaBipJACfdNceMyV H5+QRQWvycluamsWkzsaHa/csCzDhmAQAIjn7RFRBLiAsT10TeJLQ/g78cMMxD2ixbR5 zHVs/iBrIBatuPfgQtG/UpaxJqMbnz1bvCyOJ8UhjSjy32HH93jOSjtKYlpKeNzPGKp2 HwltgIJdVi0bedxLkpywgTnVuUdWP4YMvtRGFosUZIyMy6gghTenUCKAWExQTJFUEHWN qiaaKSFtL6S047FPymGYIVFe8xSX8Y5npGfi72INr9pvwEKeOPp7wUKxyAL4eso5+ew4 +x6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=u464Sxm0ujPzUaibJwHmo6uSfWYXgo9KUxPB7fJkQzM=; fh=/7ATBtl13IkXPUVLJiWoEEujdBMJVg+aOBnIIWbOQtQ=; b=hCVju0MoTRVoHtYO2i9LGgkJPb4M0KxhbFIcuNCsEDuF4UhTPm8uGIf6Ldn4ngbmcD F+6XpeogmODZO3vJFg73yw6AS6c2SdYWdKpjIpv1ia00eA4XLKF9BJkWh2Mmp4q3lBiI S5Pls7On84ZCciqIkJ24VmKpXVXWAkCr2wz3+uq47V5J5IYGTgZW/98TGo2IYG0QhjKi 9B3dKACMYpe+AbWKwSVTOD15unjPZqWTqIrJ2UajyER5nukzaCD+ZqBPHM5gZWh54Tu/ g3yf4vVuRMc3tTU1zcqNXnJfV3xBecemPtlgvnQeVD4AscPlJmcYKly4972mgYsQ+CrE pHHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Nxl4GMjr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id q8-20020a170902a3c800b001bb95a5cb9fsi14654447plb.522.2023.09.30.02.15.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 02:15:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Nxl4GMjr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 151B48190685; Fri, 29 Sep 2023 20:23:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233927AbjI3DX1 (ORCPT + 99 others); Fri, 29 Sep 2023 23:23:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbjI3DXZ (ORCPT ); Fri, 29 Sep 2023 23:23:25 -0400 Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88F84E7 for ; Fri, 29 Sep 2023 20:23:22 -0700 (PDT) Received: by mail-yb1-xb30.google.com with SMTP id 3f1490d57ef6-d818d65f23cso16358223276.3 for ; Fri, 29 Sep 2023 20:23:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696044202; x=1696649002; darn=vger.kernel.org; h=mime-version:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=u464Sxm0ujPzUaibJwHmo6uSfWYXgo9KUxPB7fJkQzM=; b=Nxl4GMjrOxtlXYw81U+yeQvVPDxU7yNtQAwOsL5B7J6jW3zOnx7/uMI5UYPWnUHMg7 tZVe/WI1q9cQubkcAUR6v2N7BnBRHYulTUCawNGafaPXwvvTvCvmCSBahstd8Dj+TsNB YaOPtWgbnBzwcxx48ufR0byj0HXVKJc+2JadwqpQMT6wEKDG7HAFPTzhIRBX1xamRk6U 9Z2WrT1HetWMi7gjZegajLuP8sDP7wG0hlBsZeqjNZeTxUux/ZXH0kM9NLDgiM9RWM7O ipSkilxhSjKBzs5a3seORum6jLDTyx1hEB7fW50v2ZH+9pmXvs7I3XcEEkJ+E16jFqIr mt8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696044202; x=1696649002; h=mime-version:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=u464Sxm0ujPzUaibJwHmo6uSfWYXgo9KUxPB7fJkQzM=; b=WlqMltQcAe3gCOsBVqqTlH9VB3+NcH26ucrrjjbV8UA5H7d5FhhNeDUG7mZFCi2nNU DoShy+QphhMhs2FDxPQLA4yv0aKJgkPYrzEQdPhyGCFw9Saa/WBeLgzRNbak4NZBp2/e waJcjjLToJ6N/Yli51Q8yyijqd1nmsB1bkmKpPKV2xBh+A7DM86YO+5mXY3vAU/vjamo yNIC1fRM4uaIZONkoHSd1f8kt+yhXvnk4Bbx2GIml2K675tjzhkgB2LwUX7FtLNlMOIx G6shDw+bAKbOByZfZeFrVLm7kURjjJFuTyJlSl6UkFtnd+6XpzoOOBG9TH1q2tpzcbnZ xjYQ== X-Gm-Message-State: AOJu0YwKcyVLc9vOr3bdH45QFBe6xUM25vKR7ZlvJiqH7iXCNcYEbTpG zf22eA9px6eOqsu38gF96c+jIA== X-Received: by 2002:a25:2601:0:b0:d71:8729:23b8 with SMTP id m1-20020a252601000000b00d71872923b8mr5578703ybm.13.1696044201598; Fri, 29 Sep 2023 20:23:21 -0700 (PDT) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id e195-20020a2550cc000000b00d8679407796sm4282793ybb.48.2023.09.29.20.23.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 20:23:19 -0700 (PDT) Date: Fri, 29 Sep 2023 20:23:11 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@ripple.attlocal.net To: Andrew Morton cc: Christian Brauner , Carlos Maiolino , Chuck Lever , Jan Kara , Matthew Wilcox , Johannes Weiner , Axel Rasmussen , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 0/8] shmem,tmpfs: general maintenance Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 29 Sep 2023 20:23:51 -0700 (PDT) And here is a series of patches based on v6.6-rc3: mostly just cosmetic mods in mm/shmem.c, but the last two enforcing the "size=" limit better. 8/8 goes into percpu counter territory, and could stand alone: I'll add some more Cc's on that one. Applies to any v6.6-rc so far, and to next-20230929 and to mm-everything-2023-09-29-23-51: hah, there's now an 09-30-01-16, I haven't tried it yet, but this should be good on that too. 1/8 shmem: shrink shmem_inode_info: dir_offsets in a union 2/8 shmem: remove vma arg from shmem_get_folio_gfp() 3/8 shmem: factor shmem_falloc_wait() out of shmem_fault() 4/8 shmem: trivial tidyups, removing extra blank lines, etc 5/8 shmem: shmem_acct_blocks() and shmem_inode_acct_blocks() 6/8 shmem: move memcg charge out of shmem_add_to_page_cache() 7/8 shmem: _add_to_page_cache() before shmem_inode_acct_blocks() 8/8 shmem,percpu_counter: add _limited_add(fbc, limit, amount) include/linux/percpu_counter.h | 23 ++ include/linux/shmem_fs.h | 16 +- lib/percpu_counter.c | 53 ++++ mm/shmem.c | 500 +++++++++++++++++------------------ 4 files changed, 333 insertions(+), 259 deletions(-) Hugh