Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4912387rdb; Fri, 15 Sep 2023 17:00:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE3d9BmD1zIgS8lta0HAVLjYc/LQanu+7lJTFwuzWspB/BpQoOpzWvmrqiQnk/T9V3kyaq9 X-Received: by 2002:a05:6a20:7f84:b0:13d:7aa3:aa6c with SMTP id d4-20020a056a207f8400b0013d7aa3aa6cmr3299035pzj.0.1694822440723; Fri, 15 Sep 2023 17:00:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694822440; cv=none; d=google.com; s=arc-20160816; b=EPX07c3LVmynQ8WpzgfvLDVhx6aFztoDZoSVPzjljbNrP6hhiTLKjq8GWhi8/VoUQv R0QsDfOCbNoXTQrGZEeeTJXCgbHZRfShP/inI+9YRt0lrepf2WACjfaL9TRYdVgcm2ue 9unylVHinas4a+nY3Szppzvh5oAsd49tRPrCpTrNB+xOcUWb10/HmXe4fSJ5IXlth9tH Fk2WdzCqaJQIvPovg83eHE3BIrQSmGvdZDagsIRQDyvtjUdi/ExljyaPsR2Dte8B1sde OLRfSG3973z8cM4QoMXDtjHhOxPUcsZRd5ekWFEivmTJpaOHxx8GtNAFH+GL3fxXJDO5 XTeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=gJpaxC+7Y+75rYPpbOd56ZO18Rl2VH2cz+UAa2NMxbE=; fh=xWRByAszZw2UoN5fNKYH9ppna1+oiaSAX/UOtkegQsY=; b=w2Q7KVkzVp49433CIRJJdiGuQVY+sASt77B9WsgO6/W1n9eEpPY4f8IkDEOKvFFwYE lY11pcwlTttB2/uB02sEj7Luhv5XicdUtLiSP+/BJj03MjdoREHwMKcapx0oDhdOciox eiPxYbA3hqQ2GDnPRVp/zc/BZ76xY7PJoWF26v+kzagZ4EUQZzFmc1ZqmgYUQvJj6gRw 5lsjZRKEgVnc58kjTHU8/a24HQMOfJhkyFpyBrJ/Oi0z7d7gn39YMr8AJlfw4UgqiA1v UnbI+eoY21NQ9kw9KbEAsyA1+SKBl5T6Ep3C1Nskogt0P3bY+i9NL80hNln6UrlVN4kJ yDww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=c90t4ru3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id bc22-20020a656d96000000b00563f8e3fca8si1516741pgb.49.2023.09.15.17.00.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 17:00:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=c90t4ru3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 3E2E58026AD6; Fri, 15 Sep 2023 08:30:45 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236077AbjIOPap (ORCPT + 99 others); Fri, 15 Sep 2023 11:30:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236129AbjIOPan (ORCPT ); Fri, 15 Sep 2023 11:30:43 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DDE36E6C for ; Fri, 15 Sep 2023 08:30:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694791801; h=from:from: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gJpaxC+7Y+75rYPpbOd56ZO18Rl2VH2cz+UAa2NMxbE=; b=c90t4ru3x5A7kVOjztv8h37VQQkDShz1z8n43SQXpCFLnST1AE0y0E8P0rYMp+SnfiFVUu Qs4+Ycok4b3APYBriE/3WIgGRfQqp8IcmKE7yLVpK24oC+SOvlXUXG2jPxXce4brvvrXDL T5XUi9e5KZ0A3RnXiCYtO4MpQ+wacnU= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-629-_onWbl8mNkanwr1lnAX78w-1; Fri, 15 Sep 2023 11:29:57 -0400 X-MC-Unique: _onWbl8mNkanwr1lnAX78w-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-401bdff6bc5so17791885e9.1 for ; Fri, 15 Sep 2023 08:29:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694791796; x=1695396596; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gJpaxC+7Y+75rYPpbOd56ZO18Rl2VH2cz+UAa2NMxbE=; b=k68eZRfDjFf30AHKkajynnLjyLF79nogl6D6X0pwD/GiBXDFP21alBst6lQ6jQwee3 XTjFkjn3Gx6zQCFi5qPo05jvwykqXuBp9XLzXCUdxlry4jH6CgL0T2M7HgNHjMizRDbJ RNjrSfz6r9f/vNmT7/B6/HNzjyxBYPXQWBYkaEL82PcOzk2dS7Frmyfm/5ACK/r1T4OP ZlDpJtd+rvAltYkzsym9GYGMKIsSU4xNJc7LU4P0hmXK6/eiOXS8/8/Bmo4MBFG0wUkO kzDkGo2cUI5Au3BQ4FWcIDI1GIInxUcSYr+BhkyQj6iDVtsmiHka6ywMRMn/333Pc6ck SVCA== X-Gm-Message-State: AOJu0Yy5Fp1/PLuSMSa5EC2WBWOWJQrMl7jyc2iv9NJ6Se+uWdviwBQ1 IJWauj8Qg3XSgSkBO7OptVL8ZvGONVIIMGuk3a6nF0CC4Igiy3wWV6zf0e6P49dvy7pHExVYCUH MubKi+T9PJAiDu28rwcWK18Hz X-Received: by 2002:a05:600c:2293:b0:3fe:5501:d293 with SMTP id 19-20020a05600c229300b003fe5501d293mr1986135wmf.30.1694791796358; Fri, 15 Sep 2023 08:29:56 -0700 (PDT) X-Received: by 2002:a05:600c:2293:b0:3fe:5501:d293 with SMTP id 19-20020a05600c229300b003fe5501d293mr1986111wmf.30.1694791795956; Fri, 15 Sep 2023 08:29:55 -0700 (PDT) Received: from ?IPV6:2003:cb:c728:e000:a4bd:1c35:a64e:5c70? (p200300cbc728e000a4bd1c35a64e5c70.dip0.t-ipconnect.de. [2003:cb:c728:e000:a4bd:1c35:a64e:5c70]) by smtp.gmail.com with ESMTPSA id l26-20020a056000023a00b0031ff1ef7dc0sm1867385wrz.66.2023.09.15.08.29.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Sep 2023 08:29:55 -0700 (PDT) Message-ID: Date: Fri, 15 Sep 2023 17:29:51 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 0/6] shmem: high order folios support in write path Content-Language: en-US To: Daniel Gomez , "minchan@kernel.org" , "senozhatsky@chromium.org" , "axboe@kernel.dk" , "djwong@kernel.org" , "willy@infradead.org" , "hughd@google.com" , "akpm@linux-foundation.org" , "mcgrof@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , "linux-xfs@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" Cc: "gost.dev@samsung.com" , Pankaj Raghav References: <20230915095042.1320180-1-da.gomez@samsung.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20230915095042.1320180-1-da.gomez@samsung.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 15 Sep 2023 08:30:45 -0700 (PDT) On 15.09.23 11:51, Daniel Gomez wrote: > This series add support for high order folios in shmem write > path. > > This is a continuation of the shmem work from Luis here [1] > following Matthew Wilcox's suggestion [2] regarding the path to take > for the folio allocation order calculation. > > [1] RFC v2 add support for blocksize > PAGE_SIZE > https://lore.kernel.org/all/ZHBowMEDfyrAAOWH@bombadil.infradead.org/T/#md3e93ab46ce2ad9254e1eb54ffe71211988b5632 > [2] https://lore.kernel.org/all/ZHD9zmIeNXICDaRJ@casper.infradead.org/ > > Patches have been tested and sent from next-230911. They do apply > cleanly to the latest next-230914. > > fsx and fstests has been performed on tmpfs with noswap with the > following results: > - fsx: 2d test, 21,5B > - fstests: Same result as baseline for next-230911 [3][4][5] > > [3] Baseline next-230911 failures are: generic/080 generic/126 > generic/193 generic/633 generic/689 > [4] fstests logs baseline: https://gitlab.com/-/snippets/3598621 > [5] fstests logs patches: https://gitlab.com/-/snippets/3598628 > > There are at least 2 cases/topics to handle that I'd appreciate > feedback. > 1. With the new strategy, you might end up with a folio order matching > HPAGE_PMD_ORDER. However, we won't respect the 'huge' flag anymore if > THP is enabled. > 2. When the above (1.) occurs, the code skips the huge path, so > xa_find with hindex is skipped. Similar to large anon folios (but different to large non-shmem folios in the pagecache), this can result in memory waste. We discussed that topic in the last bi-weekly mm meeting, and also how to eventually configure that for shmem. Refer to of a summary. [1] [1] https://lkml.kernel.org/r/4966f496-9f71-460c-b2ab-8661384ce626@arm.com -- Cheers, David / dhildenb