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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09F58C433EF for ; Wed, 6 Oct 2021 08:20:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 98378610A8 for ; Wed, 6 Oct 2021 08:20:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 98378610A8 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 0549C6B006C; Wed, 6 Oct 2021 04:20:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0042A6B0071; Wed, 6 Oct 2021 04:20:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DEA1D900002; Wed, 6 Oct 2021 04:20:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0192.hostedemail.com [216.40.44.192]) by kanga.kvack.org (Postfix) with ESMTP id CBFD06B006C for ; Wed, 6 Oct 2021 04:20:25 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 83F882CFE5 for ; Wed, 6 Oct 2021 08:20:25 +0000 (UTC) X-FDA: 78665315610.22.6A64DEC Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf03.hostedemail.com (Postfix) with ESMTP id 000433000799 for ; Wed, 6 Oct 2021 08:20:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633508424; 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=XgZihBRv/isGHyINl2U/NxKNojcHSNuLKT+jIKlViXY=; b=Pzy7sz2bgoT4OxJcCcpS7XYGMsETmJClQFI0fUZJdm2xTi2IcrVEsc7IhWrsz1VZ3YsbeK 3ktyj3cOmkyToWoXIPv6qmo+HvJ5XVdgGo7KJNMTbImtOiPNPOjYlUfdstnrIxtO+nolKt AZlqW7qR6A05zxPPiweSvJuY2cN2LLE= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-196-MsklDWUlMvOz6lFSsSVCSA-1; Wed, 06 Oct 2021 04:20:23 -0400 X-MC-Unique: MsklDWUlMvOz6lFSsSVCSA-1 Received: by mail-wr1-f71.google.com with SMTP id m17-20020adffa11000000b00160c1ac74e9so1370568wrr.9 for ; Wed, 06 Oct 2021 01:20:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=XgZihBRv/isGHyINl2U/NxKNojcHSNuLKT+jIKlViXY=; b=uON7RkBj94p5p6LGEbsS6dGz9t7cnGaTNWUK8tdbfLe+ubSfEMUij73P1ye39ToAvp mLv1y0QZ920M8b2TQhGFAOLXMTEpgtqIQITfYiBRWlqqcGwLxVWyAxiSW5jUf09hFaYj j893Wce6U+eHRzpqLlMTWKu+bwTTNUzhMdO4zf5CJf7Rb2airUr58exyPl/c1+VRVbcZ Nm8yh2oBhYHAMO/H+gLXz1HKunXHtcrZ4r2BPebcAGQPAjT+BCWQ+gu1GaDus4MT8Rh/ Kpwk3WI/XcFDqbjf2DOJhjil8EzXgtN6gCtKvUau9kqEk2cZinfJUXbz1CtFxBKI1L83 wKZw== X-Gm-Message-State: AOAM532/fmdaHfXh6mmAkcT5+oKPRXTm9ErzLY0RUGe/iYKi0FO80LAI BTimC5PRJg0qOI+dmnLxEyOb4qv8ljIusnXp8MtLv3prEbEs1YWmmoGTdtKe891UVef2zDzFctk b2GBJf1k8FpU= X-Received: by 2002:a5d:453b:: with SMTP id j27mr27480387wra.324.1633508422136; Wed, 06 Oct 2021 01:20:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVnSut8qR7L4PGDXaoJYCehhWQOCoST+P/pR8NdwcnYPsfcaRZdg1Xae+PRCRuP9la5JxGag== X-Received: by 2002:a5d:453b:: with SMTP id j27mr27480366wra.324.1633508421919; Wed, 06 Oct 2021 01:20:21 -0700 (PDT) Received: from [192.168.3.132] (p5b0c6529.dip0.t-ipconnect.de. [91.12.101.41]) by smtp.gmail.com with ESMTPSA id o1sm5616439wmq.26.2021.10.06.01.20.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Oct 2021 01:20:21 -0700 (PDT) Subject: Re: [PATCH] mm/huge_memory: disable thp if thp page size is too large To: Hao Peng Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <914a0b38-cb44-f4be-43aa-bc42bee1553b@redhat.com> From: David Hildenbrand Organization: Red Hat Message-ID: <6813b6fa-5587-7967-1f16-87b1c49084a1@redhat.com> Date: Wed, 6 Oct 2021 10:20:20 +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: 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 X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 000433000799 X-Stat-Signature: 73sujcawjmy7xxagzap1zoekfyo3p1ed Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Pzy7sz2b; spf=none (imf03.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-HE-Tag: 1633508424-121998 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 06.10.21 10:16, Hao Peng wrote: > On Thu, Sep 30, 2021 at 9:19 PM David Hildenbrand wrote: >> >> On 30.09.21 04:14, Hao Peng wrote: >>> From: Peng Hao >> >> "disable thp if thp page size is too large" you disable thp if there is >> not sufficient memory installed in the system (and for that, you use THP >> size), something doesn't add up here. >> > In addition, if THP is enabled, min_free_kbytes will be recalculated. > At this time, > min_free_kbytes is calculated based on the size of THP. If the size of > THP is too l > arge, OOM will easily be triggered. Right, I was pointing at the misleading $subject. What about something like: "mm/huge_memory: disable THP with large THP size on small present memory" ? >>> >>> After seting the page size to 64k on ARM64, the supported huge page >> >> s/seting/setting/ >> >> Fortunately, most distributions already switched to 4k, because 512MB >> THP is pretty much useless, especially on any system that doesn't have >> memory in the range of hundreds of megabytes or terrabytes. > But the ARM64 Server distribution version I use, such as CentOS for ARM64, > has a page size of 16KB or 64KB. Yeah, RHEL8 and CENTOS8 are the last remaining "recent distirbutions" I'm aware of. -- Thanks, David / dhildenb