Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3583158pxp; Tue, 8 Mar 2022 18:03:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJxlhHrqzekw81Rtnq8vVz4AHeHFeOlHy2eO0THcps3WgZ4TnsTvWm5dCnty7lkJcbw9rpGy X-Received: by 2002:a05:6a00:2311:b0:4e1:52bf:e466 with SMTP id h17-20020a056a00231100b004e152bfe466mr21079770pfh.77.1646791428460; Tue, 08 Mar 2022 18:03:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646791428; cv=none; d=google.com; s=arc-20160816; b=gaeUUPTcALQrGJs2qWuyOxZvHkbDaF5xB723uilVv/E85PpiJEAX219FjD9cK8AWmI /BSr0mLOYgbyEoyZMU7bQpmqixJfZLS6mEUPq95UW7fvDiaage7HnMx7lrqD/YwikDwR RMaXOlhch7NRFW82cE0d/TguenPKnuY0jwJHApBOdbpnzSoxSbOp6WeW4pP3gKrKIWPS qTQAeeWlAOG9AGvQTwz+a2ptSc5mdoEcu+5/zKDWruSewnvg7Qc07aULW42Np92sXL1y B/aS0AhG4ohK0sfZrR7k5+3DWPK0MpeOeDTAparEmD27CMaEdSFWY/a+tvJYCeYQsI3v f04g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=pBT9wHk0kv9phQaF2jSMAucWeXRUjsHTpKabj8I6JEU=; b=hFWtHMOcjMGh+hJ8ohxRe7DxiNY7fHQN8VJ/8tJXNm9K5y+x/lqzi1X/+mphuyYl8V rLRnXQWvBk7AMtupb/INYF9v2xvc7qhxeYy7tntIeuHQLgVsN9PbcxgK/iRmnnZds6ry t9Q+WEJcb/sPBRm4Ke2x/eHo/JqqGm8+BjdylfQqyf6M2ErW+LyQdCRe4HK0dqlpAi6/ rw/UhS5Lf5cKfLtjcwAvNbsMvFaqqO4fup18j2/tWsqzzXTRedGRHEuwb0a4VnYSTW2V eUABb/ychtkrZq0bAAwvwu0Wc6CSdd53MSSJsK4yC9MM+JXQ0yRzK10dbXYfudBgOmdS tctg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=RAmhDr5M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 68-20020a630147000000b003801b9bbd76si536328pgb.248.2022.03.08.18.03.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 18:03:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=RAmhDr5M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B669B23A185; Tue, 8 Mar 2022 16:36:51 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350519AbiCHVrW (ORCPT + 99 others); Tue, 8 Mar 2022 16:47:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350511AbiCHVrS (ORCPT ); Tue, 8 Mar 2022 16:47:18 -0500 Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B27DB554A3 for ; Tue, 8 Mar 2022 13:46:20 -0800 (PST) Received: by mail-qk1-x72a.google.com with SMTP id bm39so299447qkb.0 for ; Tue, 08 Mar 2022 13:46:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=pBT9wHk0kv9phQaF2jSMAucWeXRUjsHTpKabj8I6JEU=; b=RAmhDr5MJvaQL3qZE74+KSH75ORbbrkgRY9YObb//xmoMlf33p1hpBU9rIXZG6L7ml J+/UM1uySARXqyiozkXgec1tI0uVeDVycFFmvGBE54shXKr2/rvIjivnr7QpM+2k1g+X +MyLRsKUEWJsrs8IpmNwBg0pBdBBlc0pA0nJUj7Thmh2J9Fz9sOANtG3znbE95Dm8lrO HCzlO5HMdIBw9+kLBiRDV0nqPh+7o9hbPBoNbAXXXds8jWdu1YLtB7e8jax1fkkbp7iR cjg2PIbda0n5tQiHwcjQQwDU8eQ4Bw5JM4SDtvvqYk7/xwSqid8QSIaayOx11CfWeNOO hPJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=pBT9wHk0kv9phQaF2jSMAucWeXRUjsHTpKabj8I6JEU=; b=Ljf+KG+Jsh2avL/m1g9X6Y2pqRmoEcmsO6h5YKE4nQsqH/8yJV31VYa/8zHSNsySBw wSp+WBuo8CKioC0ikDcg1gQ6SlConM7ZwJQmdf3lVi5oP7ZhUYFieGi6gFe447Cm7IFH 4T5idARTd/kBctZ2J1QjwJ+Do7YYWEesa5ueYdPkvGUY7aQEinOez+0vIrRWx4sVYQAi jKDGu5BCIfYlXydOSJKQy42bXwgSt6fUFP35gVgoUCslw4dTlnxVtsxct4Tk9roQrely lkC0EEa7922Hx+3jmnGBTdBNq4znRI20uivbGsSwZzIPjXNVJnARDGiAJoEnzjW7DRVu CLLA== X-Gm-Message-State: AOAM533UOrVuVYoyT59y9Mdv6htwQYbP+t9ZAeMwktrfotejiSqNWJvK zQNY1baAV2ZQJ/nZ1upSWrUW9w== X-Received: by 2002:a05:620a:134e:b0:67b:d16:89f7 with SMTP id c14-20020a05620a134e00b0067b0d1689f7mr9931286qkl.123.1646775979553; Tue, 08 Mar 2022 13:46:19 -0800 (PST) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id g2-20020a37e202000000b00607e264a208sm66421qki.40.2022.03.08.13.46.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 13:46:19 -0800 (PST) Date: Tue, 8 Mar 2022 13:46:15 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@ripple.anvils To: "Darrick J. Wong" cc: Christoph Hellwig , Hugh Dickins , Andrew Morton , Mikulas Patocka , Zdenek Kabelac , Lukas Czerner , Miklos Szeredi , Borislav Petkov , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH mmotm v2] tmpfs: do not allocate pages on read In-Reply-To: <20220308172734.GC1479066@magnolia> Message-ID: <9798e3b-1c2a-6c47-decc-7d4148de5114@google.com> References: <20220306092709.GA22883@lst.de> <90bc5e69-9984-b5fa-a685-be55f2b64b@google.com> <20220307064434.GA31680@lst.de> <20220308172734.GC1479066@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=no 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 Tue, 8 Mar 2022, Darrick J. Wong wrote: > > I've long wondered (for my own nefarious purposes) why tmpfs files > didn't just grab the zero page, (tmpfs files have been using the zero page for reads for many years: it was just this odd internal "could it be for a stacking filesystem?" case, which /dev/loop also fell into, which was doing allocation on read. I wonder what your nefarious purposes are ;) Maybe related to pages faulted into an mmap: those pages tmpfs has always allocated for, then they're freed up later by page reclaim if still undirtied. We may change that in future, and use the zero page even there: there are advantages of course, but some care and code needed - never been a priority.) > so: > > Acked-by: Darrick J. Wong Thanks, Hugh