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=-5.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 A0B7AC4708E for ; Sat, 29 May 2021 02:57:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 175F8611CD for ; Sat, 29 May 2021 02:57:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 175F8611CD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3ECCD6B0036; Fri, 28 May 2021 22:57:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3C33B6B006E; Fri, 28 May 2021 22:57:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 23DAD6B0070; Fri, 28 May 2021 22:57:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id E461C6B0036 for ; Fri, 28 May 2021 22:57:51 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 7BB601807E19B for ; Sat, 29 May 2021 02:57:51 +0000 (UTC) X-FDA: 78192758742.24.D3748A3 Received: from m43-7.mailgun.net (m43-7.mailgun.net [69.72.43.7]) by imf27.hostedemail.com (Postfix) with ESMTP id B3D3580192D8 for ; Sat, 29 May 2021 02:57:41 +0000 (UTC) DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1622257070; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=UQqC9SGA/mI3zwU5m0sSjfH4Zy9TonhCXautmNeV5Uk=; b=UGnmE4ed7vY630DBcaqKBDJW5X5oa7HwT6XQJE369K24Uuc+0tgeEOO+R0XyDjvmzdfaZeBE dfJwKwpjKc3FeujYYEIBfkrUjOojzquof/B5LlXDHpkyrvX4wDedeERUseP2Y3T4QPVuTP7+ DEhAJnyRptzub5euEzCQ9P217zg= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyIwY2Q3OCIsICJsaW51eC1tbUBrdmFjay5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n04.prod.us-east-1.postgun.com with SMTP id 60b1adaee27c0cc77f7e2ebc (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Sat, 29 May 2021 02:57:50 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 73290C43143; Sat, 29 May 2021 02:57:49 +0000 (UTC) Received: from [192.168.29.110] (unknown [49.37.157.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: charante) by smtp.codeaurora.org (Postfix) with ESMTPSA id 50008C433F1; Sat, 29 May 2021 02:57:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 50008C433F1 Subject: Re: [PATCH V2] mm: compaction: support triggering of proactive compaction by user To: Nitin Gupta , "akpm@linux-foundation.org" , "mcgrof@kernel.org" , "keescook@chromium.org" , "yzaikin@google.com" , "vbabka@suse.cz" , "bhe@redhat.com" , "mateusznosek0@gmail.com" , "sh_def@163.com" , "iamjoonsoo.kim@lge.com" , "vinmenon@codeaurora.org" Cc: "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "linux-fsdevel@vger.kernel.org" References: <1621345058-26676-1-git-send-email-charante@codeaurora.org> <2733c513-d9ca-9c33-42ee-38df0a057f8a@codeaurora.org> From: Charan Teja Kalla Message-ID: Date: Sat, 29 May 2021 08:27:41 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=mg.codeaurora.org header.s=smtp header.b=UGnmE4ed; spf=pass (imf27.hostedemail.com: domain of bounce@mg.codeaurora.org designates 69.72.43.7 as permitted sender) smtp.mailfrom=bounce@mg.codeaurora.org; dmarc=none X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: B3D3580192D8 X-Stat-Signature: 3uh4966zg9aykcogwjrpfpu59n3timyp X-HE-Tag: 1622257061-889781 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: Thanks Nitin for your inputs. On 5/28/2021 5:22 AM, Nitin Gupta wrote: >> First, Does the user doing the above steps are valid? >> If yes, then we should guarantee to the user that proactive compaction >> atleast tried to run when the user changed the proactiveness. >> If not, I feel, we should document that 'once user changed the >> compaction_proactiveness, he need to wait atleast >> HPAGE_FRAG_CHECK_INTERVAL_MSEC before considering that the value he >> tried to set is effective and proactive compaction tried to run on that'. >> Doesn't this seem okay? > Proactive compaction does not guarantee if the kernel will be able to achieve > fragmentation targets implied from the compaction_proactiveness sysctl. It also > does not guarantee how much time it will take to reach desired fragmentation > levels (if at all possible). Shouldn't we add these lines in the Documentation. Will raise a patch If it is fine. > Maybe add a Kconfig parameter for setting > HPAGE_FRAG_CHECK_INTERVAL_MSEC to say 1msec? I really don't have an use case to make the HPAGE_FRAG_CHECK_INTERVAL_MSEC as config option. But should we make it as Kconfig option and let the user decide how aggressively proactive compaction should do the job of system defragmentation in his system? Selection will be limited in the range of 10msec to 500msec, defaults to 500msec. --Thanks -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project