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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 4A5F2C2D0CE for ; Tue, 31 Dec 2019 22:57:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F0735206E6 for ; Tue, 31 Dec 2019 22:57:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="PoTdDEWg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F0735206E6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6C6CC8E0005; Tue, 31 Dec 2019 17:57:05 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 676F38E0003; Tue, 31 Dec 2019 17:57:05 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 58D918E0005; Tue, 31 Dec 2019 17:57:05 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0080.hostedemail.com [216.40.44.80]) by kanga.kvack.org (Postfix) with ESMTP id 405B38E0003 for ; Tue, 31 Dec 2019 17:57:05 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id E36F7180AD801 for ; Tue, 31 Dec 2019 22:57:04 +0000 (UTC) X-FDA: 76326948768.12.care45_394753cc3204 X-HE-Tag: care45_394753cc3204 X-Filterd-Recvd-Size: 2411 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf23.hostedemail.com (Postfix) with ESMTP for ; Tue, 31 Dec 2019 22:57:04 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 91FBB206DA; Tue, 31 Dec 2019 22:57:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577833023; bh=0GKgbfUJfOfZmfwXIaCAdudkSkZZJ4yYPC80M9mz4fY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=PoTdDEWg4fXYfj6x7wEoDBmccJN0I4xh9It7yg/dJd38Cz1T0IPriKqhCWmS26OyP eeXJL5cMsu9pjRLA0Ezz7Tq0hBCf4b1ASgUJmRrJm68EcniEAdaaH/3G3tQxeuE0hE +6l5BkYT91FtAVEoZ6FfjNRNiC06N0ZS4V3AD+aA= Date: Tue, 31 Dec 2019 14:57:02 -0800 From: Andrew Morton To: vitaly.wool@konsulko.com Cc: linux-mm@kvack.org, ddstreet@ieee.org Subject: Re: [PATCH] zswap: add allocation hysteresis if pool limit is hit Message-Id: <20191231145702.69b5d7ed73d4b29a3679ebeb@linux-foundation.org> In-Reply-To: <20191225203730.4632-1-vitaly.wool@konsulko.com> References: <20191225203730.4632-1-vitaly.wool@konsulko.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Wed, 25 Dec 2019 22:37:30 +0200 vitaly.wool@konsulko.com wrote: > From: Vitaly Wool > > zswap will always try to shrink pool when zswap is full. If there > is a high pressure on zswap it will result in flipping pages in > and out zswap pool without any real benefit, and the overall system > performance will drop. The previous discussion on this subject [1] > ended up with a suggestion to implement a sort of hysteresis to > refuse taking pages into zswap pool until it has sufficient space > if the limit has been hit. This is my take on this. > > Hysteresis is controlled with a sysfs-configurable parameter > 'accept_threhsold_percent'. It specifies the threshold at which > zswap would start accepting pages again after it became full. Please let's give the full path to the sysfs file. Can we please include an update to the documentation? Documentation/vm/zswap.rst, I assume.