Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1008130rdb; Wed, 6 Dec 2023 06:23:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IEVqUuSeOz3gWC/HQOMqMkL8HJDAHSJaNGxY29Ne+cVVVYoNJz33VaZaSvv57LCT6c0rTiU X-Received: by 2002:a05:6a20:8fa5:b0:18b:69a8:fab5 with SMTP id k37-20020a056a208fa500b0018b69a8fab5mr538027pzj.15.1701872585318; Wed, 06 Dec 2023 06:23:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701872585; cv=none; d=google.com; s=arc-20160816; b=TQSqeyAwy0f/uye0aH/V9tS18hhXteQ6do4uVSyKxNcSWOgFK/G4AzteIT0mlT9tmu Dknz9gunz33cGNFo0dY06/H1M5DdFVZrzd60xTTTj1yP9Ke36pB+G08sNaxXZ/LqWlcY IIytPBf3mBGrIV460nPbmtn3zZQ24OybORibUA9xDx9rsrxnqiigZyCEhyvbNkIvbIK/ Kq1eTUsg9GCJ5C3vGstEQhumLbfPFJFXwijQloRlki4V/4msJlVcmmIhBsn+vvxlZaJY lN4wqpfzuwmFegRrN7HV2DNkJvXfLwkcAo8TsA5bwnK8aWinMNVwLUMCWtr7YBxVmgaJ P9uQ== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=MswjusitjxLuUhlUY+fRkahEItB5eltc1rBZkXiKmiU=; fh=Hhg/Irzq7NxjNc8I6dFyEpRureAOclKOpRByptRv8N8=; b=Ye/n3lYtQhDxs0bfsuGKhEelbW8q23KLSjj6Ak+WDHX8ax8g1e1F8XLX7GM+jHu8aT yXVdGQ59SjWHsrejcL0Pp3CyAZDEYWHzuUuxVp9mG3gDsIlkG2jwjox9+O+6P6IhB1os iRIp5RyToVoVyg592hIRa0MT4rqlXCLdW2xWuj//OrEA+eiZ86Rc7h9awURqzG9hrTEw 1zoPtYxIiAcSBWL2HE1ARX/BXYK911V1x+UIG6bYTRpp+OWByPqHEeKGgKzDU0MXho1y O+pJKA9mcqJ+UdPe35yyS/TwfQBBVK+CnJN82jxQ4L8qrzlQ17+is+DOIMGjz3zr7lEE frUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id x21-20020a63f715000000b005b7160263f2si11368288pgh.154.2023.12.06.06.23.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 06:23:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 3A2F180C344E; Wed, 6 Dec 2023 06:23:01 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378896AbjLFOWo (ORCPT + 99 others); Wed, 6 Dec 2023 09:22:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378736AbjLFOWn (ORCPT ); Wed, 6 Dec 2023 09:22:43 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 46437D44 for ; Wed, 6 Dec 2023 06:22:49 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EBF6A1474; Wed, 6 Dec 2023 06:23:34 -0800 (PST) Received: from [10.57.73.130] (unknown [10.57.73.130]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D7DE33F5A1; Wed, 6 Dec 2023 06:22:45 -0800 (PST) Message-ID: <7a18b924-1012-4649-9289-ab5075eb7736@arm.com> Date: Wed, 6 Dec 2023 14:22:44 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 00/10] Multi-size THP for anonymous memory Content-Language: en-GB To: David Hildenbrand , Andrew Morton , Matthew Wilcox , Yin Fengwei , Yu Zhao , Catalin Marinas , Anshuman Khandual , Yang Shi , "Huang, Ying" , Zi Yan , Luis Chamberlain , Itaru Kitayama , "Kirill A. Shutemov" , John Hubbard , David Rientjes , Vlastimil Babka , Hugh Dickins , Kefeng Wang , Barry Song <21cnbao@gmail.com>, Alistair Popple Cc: linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20231204102027.57185-1-ryan.roberts@arm.com> <8d5fdb17-c670-4814-8f48-4b90062668fc@redhat.com> <7d3457cd-5e3d-42a7-8113-545da646d7c8@redhat.com> From: Ryan Roberts In-Reply-To: <7d3457cd-5e3d-42a7-8113-545da646d7c8@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Wed, 06 Dec 2023 06:23:01 -0800 (PST) On 06/12/2023 10:22, David Hildenbrand wrote: > On 06.12.23 11:13, Ryan Roberts wrote: >> On 05/12/2023 17:21, David Hildenbrand wrote: >>> On 04.12.23 11:20, Ryan Roberts wrote: >>>> Hi All, >>>> >>>> A new week, a new version, a new name... This is v8 of a series to implement >>>> multi-size THP (mTHP) for anonymous memory (previously called "small-sized THP" >>>> and "large anonymous folios"). Matthew objected to "small huge" so hopefully >>>> this fares better. >>>> >>>> The objective of this is to improve performance by allocating larger chunks of >>>> memory during anonymous page faults: >>>> >>>> 1) Since SW (the kernel) is dealing with larger chunks of memory than base >>>>      pages, there are efficiency savings to be had; fewer page faults, >>>> batched PTE >>>>      and RMAP manipulation, reduced lru list, etc. In short, we reduce kernel >>>>      overhead. This should benefit all architectures. >>>> 2) Since we are now mapping physically contiguous chunks of memory, we can take >>>>      advantage of HW TLB compression techniques. A reduction in TLB pressure >>>>      speeds up kernel and user space. arm64 systems have 2 mechanisms to >>>> coalesce >>>>      TLB entries; "the contiguous bit" (architectural) and HPA (uarch). >>>> >>>> This version changes the name and tidies up some of the kernel code and test >>>> code, based on feedback against v7 (see change log for details). >>>> >>>> By default, the existing behaviour (and performance) is maintained. The user >>>> must explicitly enable multi-size THP to see the performance benefit. This is >>>> done via a new sysfs interface (as recommended by David Hildenbrand - thanks to >>>> David for the suggestion)! This interface is inspired by the existing >>>> per-hugepage-size sysfs interface used by hugetlb, provides full backwards >>>> compatibility with the existing PMD-size THP interface, and provides a base for >>>> future extensibility. See [8] for detailed discussion of the interface. >>>> >>>> This series is based on mm-unstable (715b67adf4c8). >>> >>> I took a look at the core pieces. Some things might want some smaller tweaks, >>> but nothing that should stop this from having fun in mm-unstable, and replacing >>> the smaller things as we move forward. >>> >> >> Thanks! I'll address your comments and see if I can post another (final??) >> version next week. > > It's always possible to do incremental changes on top that Andrew will squash in > the end. I even recall that he prefers that way once a series has been in > mm-unstable for a bit, so one can better observe the diff and which effects they > have. > I've responded to all your comments. There are a bunch of changes that I agree would be good to make (and some which I disagree with - would be good if you get a chance to respond). I think I can get all the changes done and tested by Friday. So perhaps it's simplest to keep this out of mm-unstable until then, and put the new version in on Friday? Then if there are any more small changes to do, I can do those as diffs? Thanks, Ryan