Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3047681iog; Mon, 27 Jun 2022 08:06:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uCxBomJdpnoXavNoMIIirDTlNMa9RBTjEf9Ll8InXxbXYW6pXTobk6JL4Uaa2FhWrSKLh6 X-Received: by 2002:a17:902:d2c4:b0:16a:52c3:9f66 with SMTP id n4-20020a170902d2c400b0016a52c39f66mr14965932plc.76.1656342414415; Mon, 27 Jun 2022 08:06:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656342414; cv=none; d=google.com; s=arc-20160816; b=km3CVHcxKZAQjNxKtNiJGms5Kw30v5EyTSlRdTAo5UNy7czkJIh6zK/XfL+bi8c6cm hF5hHa6fUNDABYQc4MQNTIhU8B39SM3saCN+k6f3KF9t+QizAHy5rJfXQkCqVnmKmqEa m/qzojIVP2DdUDMqyNHjTwKkz3iFjsUXSotIS7SMIdB9DgriBw0+s5FAEutIYDQyfd7Y 3gLosBzk0MbY+y2DljOLoflTrGTJBt2+1WZHUCcdtwKZAVw5gLX0WNraL30ATdvAl5dM 8RLC7pVwzKAHB42IoOfMq3byxwrOK++p8S6oFCl+x3tIOjxsMAZKYJ1PqlwCcf361LRy yq+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ntcReyowVjn4HnyNh4i2ofXYzIiLtVLY9clRf2PCq/o=; b=eJyb0u6nSdh+zqhy2EPxMMuURAN+ThTrBvWrADPpYNkIMtdJir2m3L6NXrKU+M6Z9M qNui4VxNLnPuWcserWilyP4oDTzJRW38B+kE+1mqUrmhrlaGFgEMiwbtYZ3FI0gBPxlZ ip0SyNY/Wi/m/9kBhram3+h39yRTWWYo8xw/kJ2SFg6gZGWUAuLf26xwrbonmxfN9mbn 7fMD6aSoWkdmVsryIATOrDjEJl0EtwNaHXzc6Aq270GZCPCtXBgmODBMr1ffg89vIoVm aNhFtQV6D08Q/ToZHsqzhLwGusdGzQzBhXSiwcaiHzJVrZ9aMDeuzjihBR82HhAfUjlh 0P0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Yn4jQs8D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n25-20020a63a519000000b004037c60a2acsi13333279pgf.197.2022.06.27.08.06.42; Mon, 27 Jun 2022 08:06:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Yn4jQs8D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236674AbiF0Oeu (ORCPT + 99 others); Mon, 27 Jun 2022 10:34:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237477AbiF0Oes (ORCPT ); Mon, 27 Jun 2022 10:34:48 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AACD11456 for ; Mon, 27 Jun 2022 07:34:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ntcReyowVjn4HnyNh4i2ofXYzIiLtVLY9clRf2PCq/o=; b=Yn4jQs8DMQdIfl/AuavcP6Vym4 KV1BRKVd24cbcWTUO0pVYZXCkIQJFb6CQvhYl00v4EU4DiRlxl5EcIOETEYWwp4EnuQOyNGtw2QyN yhVrDnnyby8rYPrYJjxz9YZHD8jS1eIeARTuRTrmjpnP1TgZ7il4LmiJO+K/sWbbfGQAjC8tWVi+X w7GUKSt20g8FNJAgDNmcLikkEBsR7U4xXMmtb89ZMftQbYy0Iru5bE9GnQAu1toIGFOomhbXcB9Dr 7/mCmO2644Q+m+ZAr/rjAEMhsjRfnbiAzMyb+DZW1ySzL3QMOefd/9yaWETwzIUHmNSAPfJCLjup9 SSnjcaMg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1o5pov-00BR6K-7e; Mon, 27 Jun 2022 14:34:33 +0000 Date: Mon, 27 Jun 2022 15:34:33 +0100 From: Matthew Wilcox To: Anshuman Khandual Cc: Qi Zheng , mike.kravetz@oracle.com, songmuchun@bytedance.com, akpm@linux-foundation.org, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] mm: hugetlb: kill set_huge_swap_pte_at() Message-ID: References: <20220626145717.53572-1-zhengqi.arch@bytedance.com> <037fc8c3-9b71-cb83-8882-95d5459a494f@bytedance.com> <8b4eba5d-545e-c2a4-e4cf-fd5dd6634265@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8b4eba5d-545e-c2a4-e4cf-fd5dd6634265@arm.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Mon, Jun 27, 2022 at 01:05:00PM +0530, Anshuman Khandual wrote: > > For the swap entry of hugetlb, we need to remember that we should > > call set_huge_swap_pte_at() instead of set_huge_pte_at() every > > Which is intuitive, so what is the problem ? The problem is that HugeTLB is DIFFERENT from the rest of the VM. This has a huge cost in programmer time, which is infinitely more valuable than the cycle shaving you're quibbling over. We should take any and every opportunity to make huge pages work the same way as THP and order-0 pages.