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.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 44893C761A1 for ; Wed, 19 Feb 2020 22:45:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 053A9207FD for ; Wed, 19 Feb 2020 22:45:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 053A9207FD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kerneltoast.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A40326B000A; Wed, 19 Feb 2020 17:45:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9C9FC6B000C; Wed, 19 Feb 2020 17:45:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8912D6B000D; Wed, 19 Feb 2020 17:45:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0200.hostedemail.com [216.40.44.200]) by kanga.kvack.org (Postfix) with ESMTP id 6D8DB6B000A for ; Wed, 19 Feb 2020 17:45:07 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 3558F4995FF for ; Wed, 19 Feb 2020 22:45:07 +0000 (UTC) X-FDA: 76508358654.09.wish63_2ca6b7a31d259 X-HE-Tag: wish63_2ca6b7a31d259 X-Filterd-Recvd-Size: 3205 Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Wed, 19 Feb 2020 22:45:06 +0000 (UTC) Received: by mail-pj1-f68.google.com with SMTP id e9so693406pjr.4 for ; Wed, 19 Feb 2020 14:45:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=lLbGCApp0kw/cxO3wVgRURONxiOtR+9Pq112uDjPMic=; b=rNxGEb4Q0NNQRBAWT2+DvKqPocVT4uhWq6X2QSynknku0uZIOgTlfdAD+jnE0VTSUF osGHQn+xsia2J/UVCTjiTLMKkzp6bNMNANVt4dFGVOfRiKrSz0bvA5z6koMBqFTM8FB0 v4X6DyW3lBIqboR5YxPGAKbkvsQRnGDc9kpUP5zH6PY5VpwOffOABa6DD5+POuNTneNv VVOg6J2fduRvCde6TuL28wSU0/C3bUF5xrUeLUYIMueaoLlRB7GsUTYV2yir7lx8vqHB UDnFn8+8xBEXLKOHlCBOYx0PJv/HaQfzppt/o2XuTPgX2X1vIU7WfnQoSylD/He7SSz8 0VFg== X-Gm-Message-State: APjAAAUlJqyo+H2hqZt73wBqEdgThbWlG6PHQGvg5geYfjSr9VXHmlFc cRCz21CifXgG+8WMpbCpaL4= X-Google-Smtp-Source: APXvYqzRqiVsaGXY7a6QyEtZAOH71T7kxfaQgp64P/WRyCjh5HKUpXVZchgo0NJk119epb6nRCH0FQ== X-Received: by 2002:a17:902:123:: with SMTP id 32mr28771095plb.38.1582152305677; Wed, 19 Feb 2020 14:45:05 -0800 (PST) Received: from sultan-book.localdomain ([104.200.129.62]) by smtp.gmail.com with ESMTPSA id o9sm652686pfg.130.2020.02.19.14.45.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Feb 2020 14:45:05 -0800 (PST) Date: Wed, 19 Feb 2020 14:45:03 -0800 From: Sultan Alsawaf To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: Stop kswapd early when nothing's waiting for it to free pages Message-ID: <20200219224503.GB5190@sultan-book.localdomain> References: <20200219182522.1960-1-sultan@kerneltoast.com> <20200219112653.116de9db314dade1f6086696@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200219112653.116de9db314dade1f6086696@linux-foundation.org> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000006, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Feb 19, 2020 at 11:26:53AM -0800, Andrew Morton wrote: > On Wed, 19 Feb 2020 10:25:22 -0800 Sultan Alsawaf wrote: > > > Keeping kswapd running when all the failed allocations that invoked it > > are satisfied incurs a high overhead due to unnecessary page eviction > > and writeback, as well as spurious VM pressure events to various > > registered shrinkers. When kswapd doesn't need to work to make an > > allocation succeed anymore, stop it prematurely to save resources. > > Seems sensible. > > Please fully describe the userspace-visible runtime effects of this > change? > FWIW, it looks like the refcount API doesn't allow refcounts to be zero, so I'd have to update this patch to use just plain atomic_t instead. But since there doesn't seem to be much interest in this, I'll only send an updated patch if it's desired. Sultan