From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78D56C4338F for ; Tue, 17 Aug 2021 07:31:02 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2A3BC60C3E for ; Tue, 17 Aug 2021 07:31:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2A3BC60C3E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id B52A06B006C; Tue, 17 Aug 2021 03:31:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B00D18D0001; Tue, 17 Aug 2021 03:31:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9EEEC6B0073; Tue, 17 Aug 2021 03:31:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0211.hostedemail.com [216.40.44.211]) by kanga.kvack.org (Postfix) with ESMTP id 825346B006C for ; Tue, 17 Aug 2021 03:31:01 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 17F5D20BE2 for ; Tue, 17 Aug 2021 07:31:01 +0000 (UTC) X-FDA: 78483751122.05.A7DF2AE Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf24.hostedemail.com (Postfix) with ESMTP id C462FB004D4D for ; Tue, 17 Aug 2021 07:31:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629185460; 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=kAHJ81awhh7LCsucI9D8qmpLIxkM4KynK6ce9xcolyU=; b=E/HlX+Xoxxc9kLcEyZh92EPDD3W9d1X1d/pVw61KAEjBcZzfpnapMpN3k8PM1tcrPi8w7U ODs5jgZiSpLFIyhFWkXK53MQ5PfbdnfyETSKNr0x6346BW5AmzS37anvzqJQXEj38nvqo1 SadCt7Dz19s+IKJrGQ2zOgKiykDjlGg= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-568-92CT4KsNPiKI9JtapdFIQg-1; Tue, 17 Aug 2021 03:30:58 -0400 X-MC-Unique: 92CT4KsNPiKI9JtapdFIQg-1 Received: by mail-wm1-f72.google.com with SMTP id c2-20020a7bc8420000b0290238db573ab7so650334wml.5 for ; Tue, 17 Aug 2021 00:30:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=kAHJ81awhh7LCsucI9D8qmpLIxkM4KynK6ce9xcolyU=; b=L8alX6oC6ov3I4CYlRX1QQjAAQJ3JA9TJUtc8Yhgg7fRzV9FcKQFa1twqIcZzm4lF2 JAdIz8tsbJ+iK/aUAwpA0l2h8cU6HruI5icJD/yubWKRHRIYOcLbvNgLoA+n0eHTgfvY a1i5nogv/sNoxDYV0+7cz2qR5ZPL60OcJuIM1V/kHVWxIg67vv+PZMmwaGzwujeKUJeS I6f4ILrGsMQSpvfp3mxJi2nXQXiJMWSxWZkPcKY30vxSXK5zwNGTusbVXVWS+engJMIw kXV/DkkF8a9+wVhpjWhua0WxonUq/6tB0cj7En3KRoeXR/xnqVPh7RFjxjTSYpSUt+p5 dCsw== X-Gm-Message-State: AOAM533xTtHrk0BqhH3ksLIqI9lcLSRSaK0Jg2UtrUvWHLYP89rLQO6b Pz2arKrjF/KhKfCC16aJ7qvdY/ChIA1q3djxwx8zWZ26qRRQ45cirXIZNEXvIQ5bdPYWqyGhy5K Y3szPAr6yBH8= X-Received: by 2002:a5d:42c2:: with SMTP id t2mr2244503wrr.49.1629185457743; Tue, 17 Aug 2021 00:30:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzaPlIsvK0QlsK/muXi57ibff5RTmiAMaf6agHifKdvLCC67IY4iyW+vBx7j2mloFg59RrNSw== X-Received: by 2002:a5d:42c2:: with SMTP id t2mr2244473wrr.49.1629185457541; Tue, 17 Aug 2021 00:30:57 -0700 (PDT) Received: from [192.168.3.132] (p5b0c65c6.dip0.t-ipconnect.de. [91.12.101.198]) by smtp.gmail.com with ESMTPSA id z5sm1183977wmp.26.2021.08.17.00.30.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Aug 2021 00:30:57 -0700 (PDT) Subject: Re: [PATCH RESEND 0/8] hugetlb: add demote/split page functionality To: Andrew Morton , Mike Kravetz Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Michal Hocko , Oscar Salvador , Zi Yan , Muchun Song , Naoya Horiguchi , David Rientjes References: <20210816224953.157796-1-mike.kravetz@oracle.com> <20210816162749.22b921a61156a091f3e1d14d@linux-foundation.org> <20210816184611.07b97f4c26b83090f5d48fab@linux-foundation.org> From: David Hildenbrand Organization: Red Hat Message-ID: Date: Tue, 17 Aug 2021 09:30:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210816184611.07b97f4c26b83090f5d48fab@linux-foundation.org> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="E/HlX+Xo"; spf=none (imf24.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: C462FB004D4D X-Stat-Signature: 8fbnuhcab39huou5z4e5k1rkk1667goi X-HE-Tag: 1629185460-515311 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 17.08.21 03:46, Andrew Morton wrote: > On Mon, 16 Aug 2021 17:46:58 -0700 Mike Kravetz wrote: > >>> It really is a ton of new code. I think we're owed much more detail >>> about the problem than the above. To be confident that all this >>> material is truly justified? >> >> The desired functionality for this specific use case is to simply >> convert a 1G huegtlb page to 512 2MB hugetlb pages. As mentioned >> >> "Converting larger to smaller hugetlb pages can be accomplished today by >> first freeing the larger page to the buddy allocator and then allocating >> the smaller pages. However, there are two issues with this approach: >> 1) This process can take quite some time, especially if allocation of >> the smaller pages is not immediate and requires migration/compaction. >> 2) There is no guarantee that the total size of smaller pages allocated >> will match the size of the larger page which was freed. This is >> because the area freed by the larger page could quickly be >> fragmented." >> >> These two issues have been experienced in practice. > > Well the first issue is quantifiable. What is "some time"? If it's > people trying to get a 5% speedup on a rare operation because hey, > bugging the kernel developers doesn't cost me anything then perhaps we > have better things to be doing. > > And the second problem would benefit from some words to help us > understand how much real-world hurt this causes, and how frequently. > And let's understand what the userspace workarounds look like, etc. > >> A big chunk of the code changes (aprox 50%) is for the vmemmap >> optimizations. This is also the most complex part of the changes. >> I added the code as interaction with vmemmap reduction was discussed >> during the RFC. It is only a performance enhancement and honestly >> may not be worth the cost/risk. I will get some numbers to measure >> the actual benefit. If it really makes that much of a difference code/complexity wise, would it make sense to just limit denote functionality to the !vmemmap case for now? -- Thanks, David / dhildenb