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=-18.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 BA21CC07E95 for ; Tue, 20 Jul 2021 12:12:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6B2E76100C for ; Tue, 20 Jul 2021 12:12:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B2E76100C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CE85D6B00A6; Tue, 20 Jul 2021 08:12:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C983D8D0001; Tue, 20 Jul 2021 08:12:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B11526B00BD; Tue, 20 Jul 2021 08:12:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0033.hostedemail.com [216.40.44.33]) by kanga.kvack.org (Postfix) with ESMTP id 888136B00A6 for ; Tue, 20 Jul 2021 08:12:00 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 086191850693B for ; Tue, 20 Jul 2021 12:11:59 +0000 (UTC) X-FDA: 78382852758.13.4F79617 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf15.hostedemail.com (Postfix) with ESMTP id 8A8BFD0000B1 for ; Tue, 20 Jul 2021 12:11:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626783117; 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=oReIL6acdVDkxRaEqov1JhvUFfGcr08r8jgYKed1STE=; b=fQuNIrqV33wmBSMYbqTRf7FQAEp9t1Gyw26Z+JP76b3XpLhau1p3LHlZ18B4FNnjJc1Nhu p7WEbygpeBxPoN5hogbX6tGgkytcPuONeev/leUEoxAT2ZVAhKzN7om3sQLw/UlNgLzugf aFm+VneLx/54W45QqIvfghw3SxhAzKQ= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-287-y-Z3v-U8On676BW5yQX9AA-1; Tue, 20 Jul 2021 08:11:54 -0400 X-MC-Unique: y-Z3v-U8On676BW5yQX9AA-1 Received: by mail-wm1-f71.google.com with SMTP id b26-20020a7bc25a0000b0290218757e2783so1172673wmj.7 for ; Tue, 20 Jul 2021 05:11:54 -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=oReIL6acdVDkxRaEqov1JhvUFfGcr08r8jgYKed1STE=; b=Hl2Rv+fv0NeDutM+L992RrGD+8JnluCzzkwYZlAfNy0rXJkFULmvfJLemoKAqeTQxe zROkyzUCKY8TvzenT6z+iJjrRavEumKUL1K3IQexahc/2nnmShgborjOf47ROCn+8cBl EByKDcsO1ShM9z+lynHRk3AJP/gMSYFEpdsEX5VYjwnbeA2YcwaKvbZHOuXd3xkrHBgG gZzvgJ01N0H2QpFVReYpGJRVG0thy7ykDzhbxWZJS7bWuYZoIzMQcVkTEW5C8BzMLB4f y99Ebr1TeP/9aQz9qmAjhU8qo+/+evlR83Yga/FhnBswvyNIrscaFVPy6sFFboqrt56b XjJg== X-Gm-Message-State: AOAM531FX8C6hSNm6NkX/IU9E2zBnlNAhP6mgYmPqt1j4ESdWCY6rv4q 6Jv0UG+NSas+aMYrYGmv7NU1Y0ixYfRkcbq7qRBHBFsmPqHcKdAKOR2cq8WM9ackx2rlaKP6Jl1 gTgylxuCyliA= X-Received: by 2002:a05:6000:1886:: with SMTP id a6mr19531355wri.17.1626783113344; Tue, 20 Jul 2021 05:11:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUyH4RPmU2Nt4iB8VUVazFrWJUphlow/MIFR3IlF6/bUWocqsQSCiw4NMPoarv9klOzn3T1g== X-Received: by 2002:a05:6000:1886:: with SMTP id a6mr19531331wri.17.1626783113131; Tue, 20 Jul 2021 05:11:53 -0700 (PDT) Received: from ?IPv6:2003:d8:2f0a:7f00:fad7:3bc9:69d:31f? (p200300d82f0a7f00fad73bc9069d031f.dip0.t-ipconnect.de. [2003:d8:2f0a:7f00:fad7:3bc9:69d:31f]) by smtp.gmail.com with ESMTPSA id n5sm22627506wri.31.2021.07.20.05.11.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Jul 2021 05:11:52 -0700 (PDT) Subject: Re: [PATCH] mm: make falutaround selectable To: Chanho Min , Andrew Morton , linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, "Kirill A . Shutemov" , Gunho Lee , Juneho Choi , Inkyu Hwang References: <20210719010845.31898-1-chanho.min@lge.com> From: David Hildenbrand Organization: Red Hat Message-ID: <42adbf38-7b1a-3039-c309-3d7023fc7c6c@redhat.com> Date: Tue, 20 Jul 2021 14:11:52 +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: <20210719010845.31898-1-chanho.min@lge.com> 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: imf15.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=fQuNIrqV; spf=none (imf15.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 216.205.24.124) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam02 X-Stat-Signature: 6fc9cqt5m1fsyubmt5ezkk3sm8898wec X-Rspamd-Queue-Id: 8A8BFD0000B1 X-HE-Tag: 1626783118-641107 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: s/falutaround/faultaround/ On 19.07.21 03:08, Chanho Min wrote: > While faultaround can have performance gains, on certain platform it > increases pss and causes swap to occur more frequently. This patch allows > to unselect faultaround on platforms that do not want this behavior. > > Signed-off-by: Chanho Min > --- > mm/Kconfig | 6 ++++++ > mm/memory.c | 4 ++++ > 2 files changed, 10 insertions(+) > > diff --git a/mm/Kconfig b/mm/Kconfig > index 39a6a977537d..8f834386e7f3 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -750,4 +750,10 @@ config ARCH_HAS_PTE_SPECIAL > config ARCH_HAS_HUGEPD > bool > > +config FAULT_AROUND > + bool "Enable fault around" > + default y > + help > + This option enables fault around. If say N, fault_around_bytes set to PAGE_SIZE > + and disables fault around. > endmenu > diff --git a/mm/memory.c b/mm/memory.c > index 10d2e4734e82..0bb037265dda 100644 > --- a/mm/memory.c > +++ b/mm/memory.c > @@ -3500,7 +3500,11 @@ vm_fault_t finish_fault(struct vm_fault *vmf) > } > > static unsigned long fault_around_bytes __read_mostly = > +#ifdef CONFIG_FAULT_AROUND > rounddown_pow_of_two(65536); > +#else > + PAGE_SIZE; > +#endif > > #ifdef CONFIG_DEBUG_FS > static int fault_around_bytes_get(void *data, u64 *val) > -- Thanks, David / dhildenb