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,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 3082FC4724C for ; Thu, 7 May 2020 23:04:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C5795208D6 for ; Thu, 7 May 2020 23:04:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="NSwLOrPu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C5795208D6 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 4788B900003; Thu, 7 May 2020 19:04:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4292F900002; Thu, 7 May 2020 19:04:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 315FA900003; Thu, 7 May 2020 19:04:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0135.hostedemail.com [216.40.44.135]) by kanga.kvack.org (Postfix) with ESMTP id 1AEFF900002 for ; Thu, 7 May 2020 19:04:41 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 9B13B8120 for ; Thu, 7 May 2020 23:04:40 +0000 (UTC) X-FDA: 76791454320.21.shop00_62fbe76fdc918 X-HE-Tag: shop00_62fbe76fdc918 X-Filterd-Recvd-Size: 2537 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf16.hostedemail.com (Postfix) with ESMTP for ; Thu, 7 May 2020 23:04:40 +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 E092C208D6; Thu, 7 May 2020 23:04:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588892679; bh=sOdZ8xLeykG3/i/JUyklEJJMF0/D0IIXGb47O2HJ2Mg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NSwLOrPuuyCkN9Lb9rVz/kC4ALjEmJWYGRAMAB9dt/uvKnLN9DYPrEwpFrNRCbn5j r9LRq+rK7er4T9EDm4MINIqFA1mQxQ0btLmgBoOvGJRS4xGhFv05Kin09la/Q5qGHB IJOwvyF6k/oZB0Zf7bVEVN3jGL11M4UPJ3VMRSR0= Date: Thu, 7 May 2020 16:04:38 -0700 From: Andrew Morton To: "Guilherme G. Piccoli" Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, gavin.guo@canonical.com, kernel@gpiccoli.net, Mel Gorman Subject: Re: [PATCH] mm, compaction: Indicate when compaction is manually triggered by sysctl Message-Id: <20200507160438.ed336a1e00c23c6863d75ae5@linux-foundation.org> In-Reply-To: <20200507215946.22589-1-gpiccoli@canonical.com> References: <20200507215946.22589-1-gpiccoli@canonical.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 Thu, 7 May 2020 18:59:46 -0300 "Guilherme G. Piccoli" wrote: > Currently we have no way to determine if compaction was triggered > by sysctl write, but this is an interesting information to have, > specially in systems with high uptime that presents lots of > fragmented memory. There's no statistic indicating if compaction > was triggered manually or ran by Linux itself, the vmstat numbers > cannot tell the user this information. Could add it to vmstat? > This patch adds a very simple message to kernel log when compaction > is requested through a write to sysctl file, and also it accumulates > the number of previously manual compaction executions. It follows > the approach used by drop_caches. Userspace could write to /dev/kmsg when it decides to trigger compaction? Although using the kernel log seems a fairly lame way for userspace to record its own actions...