Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp992648ybv; Wed, 19 Feb 2020 13:34:22 -0800 (PST) X-Google-Smtp-Source: APXvYqyr7orbcFP3U1h0sqnRoX/gqooFict78IwdSGAoA6JwSjZc1RRAHK54FTzlWCPa2Um3ckeL X-Received: by 2002:a9d:3b3:: with SMTP id f48mr21064510otf.148.1582148062723; Wed, 19 Feb 2020 13:34:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582148062; cv=none; d=google.com; s=arc-20160816; b=r9QjVcOe2lSPScBumDXOxc1om7J9N978whUA1nI2+64QLP1vZVUvgPwBuL1Frf5+be 4nRhMJaDeU0crklmG3OfQsU79m7xOGcC4LK2Hl5Yv6kRviECHM5gQu4w6f3EVhempc9J d/qk4ntPoOXGufckUi+xAFda5B79AZRVJfMVhQGOtVllD8DOaEsWk3W38reKlsE/Ly9G hvI7V6H3608qGAYKWrErXCjMUJJ8/Lz9l1sQgESfzuZoDcqFVXIV5fBVUA2LpTy3L8Jf xDi+9N4LjKg9wAc9I9ebG7icofF+d9JO3nn/sLajXRx8WMqTWPBFEeQMvkXJx/goIS8x QWRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=JVkD5nxiTD0qf2+tDsHsfNYWqcQb37JvAO77tIsuHko=; b=rOsAQXtEloeMJsbUyT9ODvsmdv7qq36apLbz3u1R/bLfEgsTtpxAEPf0/y2BMVHFVk jA0RPCB5rKcJTRLIryIQnyeYs/FECj6jRT0Ds+GJdYqWvSaV6UIXXCGaFy1blKU2LxGp 7/XYAZ8qo9Nd3PlraUtLR2IdYsGQuK2tMfY+g8cXM1dWk1mfd8Jsr6dLv0NLJWFJnRi3 LDwjvpryYpbqYcrVP05N+xBBu/F6iddAiLU+GJTatFJ/MlMJ23xGhp/Pd/i0S7mGI7Ic EvCm/h2gGvAz0NRZXFmzO/8dCE59vfsBrqDIgiiGnG1VC/mIlhXU7YpC87HwPdvj0O/S bZGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=KHQvflBu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h64si9572654oif.215.2020.02.19.13.34.10; Wed, 19 Feb 2020 13:34:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=KHQvflBu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727880AbgBSVdi (ORCPT + 99 others); Wed, 19 Feb 2020 16:33:38 -0500 Received: from mail-qv1-f65.google.com ([209.85.219.65]:39871 "EHLO mail-qv1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727775AbgBSVdi (ORCPT ); Wed, 19 Feb 2020 16:33:38 -0500 Received: by mail-qv1-f65.google.com with SMTP id y8so912127qvk.6 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=GaqoR9xmnohbOD99HPaAJRPIHFK3nfVCwCQnZaHBidRStPTJ+/UnRIRoaXJdhJfR7V SUHZ60EKFDkOHeAEcdl9eRzkbrMUdQNSMAnn4fwCNFTSDbZkR8nh3jSoFOIA1R4Eaq+T Hppu9j9GlfPhGbIppLFwcXuPUjgWPXmJihbFZIswk3IqRCHNmDVKYNOJbnlQVlDR6+PR QWafH6BtCJ9PvvE84nQbxWPhRL3kA1yYnfOwxWWCpge+tsNJz1lAfsx2uw/OsX80dmcR YSYzpOyhwaG+vAnwmQT3WCnKwah/7K67yYUOBME6AnXW7X1SpzwwjlT053tM3KRHCVqE xO9A== X-Gm-Message-State: APjAAAWAPipuMhyVc99780Oi2mtz2uaGe67DPd8qg3a9NQajOVD9Bu4i N5I743Nf/z/SuWXMM5rhbkT6Kw== 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.