From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E96967603F for ; Mon, 27 Jan 2025 10:38:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737974294; cv=none; b=KWjHC89jXCHu495AsvsCUy348snQ2+u89ZL17hDneJz0UWvUc+USvf5TunQdxzxFKksThrr+SzbIXMGEoFENvZj7U2Asmkinbrdid8a1hz4isC/jIpgm3Aml+O/vF5rp/LZGeI+tWf3ZKyuwA+7MgJdj3sqMy9Mkoe+Jeh/lw5c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737974294; c=relaxed/simple; bh=XpPVFj2O1tCWro+mIjw8qWt/tIufZU5+dpEJUgRyb+E=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=T3BhRZNHXzdG0rK+We6KcDbnn0cWl6S/KoKDIevUMSD+3q/qgoDQ1bjL7wsDc2VpfZysdFNqlL6TwxkzE9f/UCd3dRrOsk5dbF93Nf939NXW6e5wSLozoEwSH70qS14+hpjPZDf6BPESmYyHL/DRct+nlbK8mGleaEOtWQ+KuuM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=ujQ6jATg; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=iNozitFL; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=lf+wJak6; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=Pz3Ed0hO; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="ujQ6jATg"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="iNozitFL"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="lf+wJak6"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="Pz3Ed0hO" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 637FF21114; Mon, 27 Jan 2025 10:38:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1737974290; h=from:from:reply-to: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=7xZ9s/iwkA5vByA5ZEVnxTS5K9/0xpzlaG6UM0vCcZI=; b=ujQ6jATgQp3pJeZ/9nNEePKWDgdg/sW6p1ZLV5hUlcqxeTl6F1T8I3K6PP8V5zOyGG4BDW cgfKFGdSCDGXQf7F19Nf2+po6+4kZaILrdkFl+wkkF1GO/XtwgV+1Bn2Yq0Z4yuiasFGvK YPo0MUHZLKCZs7jpfWN2d31dZYu7vMo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1737974290; h=from:from:reply-to: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=7xZ9s/iwkA5vByA5ZEVnxTS5K9/0xpzlaG6UM0vCcZI=; b=iNozitFLSEnBka0kZXOCnTCSsS5coN8WW32Hm2Nl5FrKRq92ljp4Oi4H3fqgGUUS95rniK E4j0hI3Ucm/rXxCw== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=lf+wJak6; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=Pz3Ed0hO DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1737974288; h=from:from:reply-to: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=7xZ9s/iwkA5vByA5ZEVnxTS5K9/0xpzlaG6UM0vCcZI=; b=lf+wJak6Dw74/aXAkCCf5MmjSx6z03jq4IQStHmhMFcNRqzp+PF52bYGRgwM2CnRZRAngT z8E+/+G93ts7zomP8DY+VhqU5Iaqr/8JloD5ha2FsoMRQQcEHuqzebnvEB/AzAOgULwtR2 yS847fAKM1lVLMHFL5AvsSBzlrt+b6E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1737974288; h=from:from:reply-to: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=7xZ9s/iwkA5vByA5ZEVnxTS5K9/0xpzlaG6UM0vCcZI=; b=Pz3Ed0hOr+FcmAgpjYdRcolY9kvUh/HgP3+ncNHxBOxgMrs13NbjgtPZ0Gc6yuTBcYoFod Hpxa/CDOEqWy1FCQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 5034B13715; Mon, 27 Jan 2025 10:38:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id reUsExBil2f1ZQAAD6G6ig (envelope-from ); Mon, 27 Jan 2025 10:38:08 +0000 Message-ID: Date: Mon, 27 Jan 2025 11:38:08 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] mm/compaction: remove low watermark cap for proactive compaction Content-Language: en-US To: Michal Clapinski , Andrew Morton , Nitin Gupta , Pasha Tatashin Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20250124182140.2243862-1-mclapinski@google.com> <20250124182140.2243862-2-mclapinski@google.com> From: Vlastimil Babka In-Reply-To: <20250124182140.2243862-2-mclapinski@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 637FF21114 X-Spam-Level: X-Spamd-Result: default: False [-4.51 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCPT_COUNT_FIVE(0.00)[6]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.cz:dkim,suse.cz:mid]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.cz:+] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -4.51 X-Spam-Flag: NO On 1/24/25 19:21, Michal Clapinski wrote: > Previously a min cap of 5 has been set in the commit introducing > proactive compaction. This was to make sure users don't hurt themselves > by setting the proactiveness to 100 and making their system > unresponsive. But the compaction mechanism has a backoff mechanism that > will sleep for 30s if no progress is made, so I don't see a significant > risk here. My system (20GB of memory) has been perfectly fine with > proactiveness set to 100 and leeway set to 0. What if you don't set the leeway to 0? In other words, should we keep the cap in some sense but make it depend on the leeway? > Signed-off-by: Michal Clapinski > --- > mm/compaction.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/compaction.c b/mm/compaction.c > index a2b16b08cbbff..29524242a16ef 100644 > --- a/mm/compaction.c > +++ b/mm/compaction.c > @@ -2253,7 +2253,7 @@ static unsigned int fragmentation_score_wmark(bool low) > * activity in case a user sets the proactiveness tunable > * close to 100 (maximum). > */ > - wmark_low = max(100U - sysctl_compaction_proactiveness, 5U); > + wmark_low = 100U - sysctl_compaction_proactiveness; > return low ? wmark_low : min(wmark_low + 10, 100U); > } >