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=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 E089BC3524E for ; Wed, 19 Feb 2020 21:33:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A2AAB2465D for ; Wed, 19 Feb 2020 21:33:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg-org.20150623.gappssmtp.com header.i=@cmpxchg-org.20150623.gappssmtp.com header.b="KHQvflBu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A2AAB2465D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cmpxchg.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3E6D86B007D; Wed, 19 Feb 2020 16:33:41 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 397776B007E; Wed, 19 Feb 2020 16:33:41 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2D4056B0080; Wed, 19 Feb 2020 16:33:41 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0142.hostedemail.com [216.40.44.142]) by kanga.kvack.org (Postfix) with ESMTP id 12E3C6B007D for ; Wed, 19 Feb 2020 16:33:41 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id CB9EA4820 for ; Wed, 19 Feb 2020 21:33:40 +0000 (UTC) X-FDA: 76508178600.28.bear33_2ee964982848 X-HE-Tag: bear33_2ee964982848 X-Filterd-Recvd-Size: 4138 Received: from mail-qv1-f65.google.com (mail-qv1-f65.google.com [209.85.219.65]) by imf16.hostedemail.com (Postfix) with ESMTP for ; Wed, 19 Feb 2020 21:33:38 +0000 (UTC) Received: by mail-qv1-f65.google.com with SMTP id s6so913627qvq.4 for ; Wed, 19 Feb 2020 13:33:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=JVkD5nxiTD0qf2+tDsHsfNYWqcQb37JvAO77tIsuHko=; b=KHQvflBumvT9ocn+DUGF92g5qIEYXn4RpN+sBAiiGI7qDTLMDNvmMXdzmPx07tdVC5 Z0jvJ9KvD3Oz7dzhrCjSoFhzzkkoRZ5cfSGee6fXlC4SGMn+qcgJb69EApxW+QV0Ithg yFxee/9aU7GZEi96Gqkjtz9aGbnDEFfrQR2RtxW3VYOlLw45JSNOGyp0Qo2KHPO4KTEF fO+TS/HO2EgULbw5hfQWr8Ui6ZzSceXUwwZI2AQcNjv8OJCCdE9TwIsToHxrKor4ndV+ a4UIjjq/mOCYYiNdlRbZawGhrrSJpjoQsKrEzSmsPSJkWMOrGT7A5yXMxtog1VXEBgr6 GCOQ== 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=JVkD5nxiTD0qf2+tDsHsfNYWqcQb37JvAO77tIsuHko=; b=s/K1/9fhF74FtKbB7BZte8VzxmQTKWspA5/f17Yj4U5bQsVpSTUYu439G2fw2kLz3+ eYYb2wlk9uX4IZnQ81VEt1QgEYkyJxikUemYFGn+ST/taZtbcwq7u40tAumfV2ixLYOU bgJJYm4JQkxDUGH/3OqmNTfu0LGPwfjig3LS+1V4NZaSEblH+08VGZDACxhYG92J6JjG wICFiz4bR7MW00xOePMLvsRBIvsabf/CKK9JSEIksk4Pz1sw1zLHInR1njgWujVd4Q30 rgdXD1ZqUL9VSiVL+N2Ha+lCfbkSBFhy36wGYcwFhKS9Xeb5ZIjosNIS8EiA+SidvYM/ Seyw== X-Gm-Message-State: APjAAAUp9ZpTMBGKRH8xHtb0OH5XNsdz3TjEf3CqM7OgN/ZMX5GgmUXD hL9HW/kRn4Yf5aH+22JZhk4Hgw== X-Google-Smtp-Source: APXvYqzEXXsR5u3FJN/PyxBmZtf/Z8ndTXA0RM2zBRR4GY9UMh7JsgHW89x2UTENdKZ+5MLtTmbR5A== X-Received: by 2002:a0c:e2d1:: with SMTP id t17mr23178016qvl.25.1582148017323; Wed, 19 Feb 2020 13:33:37 -0800 (PST) Received: from localhost ([2620:10d:c091:500::2:3bde]) by smtp.gmail.com with ESMTPSA id g62sm512111qkd.25.2020.02.19.13.33.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Feb 2020 13:33:36 -0800 (PST) Date: Wed, 19 Feb 2020 16:33:35 -0500 From: Johannes Weiner To: Andrew Morton Cc: Michal Hocko , Tejun Heo , Roman Gushchin , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH] mm: memcontrol: asynchronous reclaim for memory.high Message-ID: <20200219213335.GE54486@cmpxchg.org> References: <20200219181219.54356-1-hannes@cmpxchg.org> <20200219183731.GC11847@dhcp22.suse.cz> <20200219113139.ee60838bc7eb35747eb330fa@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200219113139.ee60838bc7eb35747eb330fa@linux-foundation.org> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000014, 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:31:39AM -0800, Andrew Morton wrote: > But what was the nature of these stalls? If they were "stuck in D > state waiting for something" then that's throttling. If they were > "unexpected bursts of in-kernel CPU activity" then I see a better case. It was both. However, the workload was able to perform with no direct reclaim activity and no stalls, while memory.high semantics were never violated. This means that allocation rate was not outstripping reclaim rate, just that both of these things happened in bursts and sputters. If the workload isn't exceeding the memory.high grace buffer, it seems unnecessary to make it wait behind a reclaim invocation that gets delayed on IO but will succeed before the workload comes back for the next allocation. We can just let it get on with its thing, actually work with the memory it just obtained, while background reclaim will free pages as they become reclaimable. This is a win-win situation.