Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1479687ybk; Sun, 10 May 2020 18:27:57 -0700 (PDT) X-Google-Smtp-Source: APiQypIDt+oUyMHg7C56UXVgKAooE4JUakW3FhtffhiOrzdiePjvffyUYuUS7oUAgbJ2FozYKCAy X-Received: by 2002:a17:907:2711:: with SMTP id w17mr8359316ejk.8.1589160477404; Sun, 10 May 2020 18:27:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589160477; cv=none; d=google.com; s=arc-20160816; b=ng/SftM0D2O6ZSLhErx8HLBtbx8vI7Giuo0HTTbudLVx4q9LPdUOS1H8vvOx9m21Nd DrRza7zDlWgztngn5QVVXu2GqLkPfrUAKeueczucBIP0iD3HWxylENK+Aim2wRP7cRlg uXBPIuqEvK4DO1C1A/qXp5RUPpxlpkQOMyl1xNzLe18ilvXHZwuRIh4r+zczyrZ4fI1D T6smEWGwvjUSNWKthApeWHWxnaO1/KuMcmeh9BWLEQ6xahu71bfxB+qF13YLs74NvvvK ZF32ek+fH7R/G9dCRi4HawSmZOXzMuSVwo543++7M889O+xPJzHcSlQQa8JGyrxEI7e6 vvVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=rrpue9ELDAyjtjXQonJqUPBUAIMsAtBRTq6A+RPQWpw=; b=EjNSAjxb5L/iVBCF1ueI3C66uxhP2uwJxGHLyAUxQhd3M2fyhij3IGD+hULo9pEggv TSNU3k2Y86PG3hopps8Y/FUO+lVA1sbyQbCTCOmbsxeNnIMegPa3/1svng7tmzqs0MmG GluofDw86qw3j9Lo7o5PWEGQ1Ny82Y1xAC26z1cSboIA+IJJT5KKLn56YLw/O9GFdBFf G8xpgJ7242FTBPN8whexOOiwQUHhGk/Kdjxaca8aOFR4qCOlmmvYLrFiHYI1Yi3uS4Om BxWjdLv3+wRYBr10/k9Hm2cXxfEaLobuT36pufQ7CbJIUQQB8dXIPSG8O7RssYbJWSCs fhOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=XWwCZN3j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u17si5262840ejz.246.2020.05.10.18.27.30; Sun, 10 May 2020 18:27:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=XWwCZN3j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729178AbgEKBZA (ORCPT + 99 others); Sun, 10 May 2020 21:25:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727789AbgEKBZA (ORCPT ); Sun, 10 May 2020 21:25:00 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59FE4C061A0C for ; Sun, 10 May 2020 18:25:00 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id x77so4022245pfc.0 for ; Sun, 10 May 2020 18:25:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=rrpue9ELDAyjtjXQonJqUPBUAIMsAtBRTq6A+RPQWpw=; b=XWwCZN3jW3/5HtRXyFm+DTTr5MV4v9xZjc1MlfUlO//spcTx5rVeX/uovT5jprL0QC GQBFO+UtZrdtb4gEq5y1skPW8asQ/rag5f77L0I8AdH/AgEwoX2wDVEK8OLDK0WU4rU4 JCutFIXlcwaGirD1TnrQ320raqdIyH4ZdVA2bezfFFl98GBrnI+h0FipAMm8s6CCivlm JubRMJELEpK6EZOJZ5sw4hB8NTz1mu7rjH69Bb56gDerLBtPO2oFkyx4oGq2WrV7YkG/ rPExuNrXFDCLfmqSwBwP9MpyZliK9c+xNBOlpLmAerKY0/Pil4n+9Dp9mAXOmzLzyi9Y 1N+Q== 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:in-reply-to:message-id :references:user-agent:mime-version; bh=rrpue9ELDAyjtjXQonJqUPBUAIMsAtBRTq6A+RPQWpw=; b=ExcpItB2uLa4IBE5Gl7Zx3Hpw5TpqSpqTWYYssJ135znZVuqBhkhyqCpb6NKIjKMt0 gmrQpwLXQXp1yArTA7uZpMUlashFuSb3S5DcMJcE2a9ei4WmxUCOtm4+8p8m6bbYjYhV 0bzfBJfTo486ySsMqwb5UF46MMDiFSLDYLATpVlz0JXg+Ea+dWYMiMkopScabI8OIIrp cYCC82sbcYAHUYtz8+KzCzruNTexKp3qcWMiLDUlicCsjicCkzIvbDbtnxT+5jX+3u+6 73dE6s1vYClZ6lC2s/Hr8omuoQZt4XtxuSlKAUtzT6Y9NffmcVHXSqgy/S4ypdXdkEUc cOKQ== X-Gm-Message-State: AGi0PuZ9+34L5QMLdxG+9KXrm+3oxS4aJkROZr7GMg7wsHptl+atcD1N oGvjSKYUrXpUgsDkrP7dG8k9uQ== X-Received: by 2002:a63:792:: with SMTP id 140mr7940224pgh.65.1589160299547; Sun, 10 May 2020 18:24:59 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id z7sm7622992pff.47.2020.05.10.18.24.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 May 2020 18:24:58 -0700 (PDT) Date: Sun, 10 May 2020 18:24:58 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Guilherme Piccoli cc: "Guilherme G. Piccoli" , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Gavin Guo , Mel Gorman Subject: Re: [PATCH] mm, compaction: Indicate when compaction is manually triggered by sysctl In-Reply-To: Message-ID: References: <20200507215946.22589-1-gpiccoli@canonical.com> <20200507160438.ed336a1e00c23c6863d75ae5@linux-foundation.org> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 8 May 2020, Guilherme Piccoli wrote: > On Fri, May 8, 2020 at 3:31 PM David Rientjes wrote: > > It doesn't make sense because it's only being done here for the entire > > system, there are also per-node sysfs triggers so you could do something > > like iterate over the nodemask of all nodes with memory and trigger > > compaction manually and then nothing is emitted to the kernel log. > > > > There is new statsfs support that Red Hat is proposing that can be used > > for things like this. It currently only supports KVM statistics but > > adding MM statistics is something that would be a natural extension and > > avoids polluting both the kernel log and /proc/vmstat. > > Thanks for the review. Is this what you're talking about [0] ? Very interesting! > Exactly. > Also, I agree about the per-node compaction, it's a good point. But at > the same time, having the information on the number of manual > compaction triggered is interesting, at least for some users. What if > we add that as a per-node stat in zoneinfo? > The kernel log is not preferred for this (or drop_caches, really) because the amount of info can causing important information to be lost. We don't really gain anything by printing that someone manually triggered compaction; they could just write to the kernel log themselves if they really wanted to. The reverse is not true: we can't suppress your kernel message with this patch. Instead, a statsfs-like approach could be used to indicate when this has happened and there is no chance of losing events because it got scrolled off the kernel log. It has the added benefit of not requiring the entire log to be parsed for such events.