Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3696210ybi; Fri, 19 Jul 2019 07:30:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqye07bE7HrdM7DUqO8bSz0bniVkW4RDmDngHryzMIioHsenSF1bkxGb+2m17hAvD7g3FzOH X-Received: by 2002:a63:f857:: with SMTP id v23mr29692436pgj.228.1563546616542; Fri, 19 Jul 2019 07:30:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563546616; cv=none; d=google.com; s=arc-20160816; b=lga2XgCguH06xcK9/JUQdJN0dB06N1jHhikJhygnJx7rMhnoZYLUbC4B84q7Y4pOuz PUmJkMEG8KzQ/MKKzUwRnMSFvAhzLCROsGcGNCucQs+nTDLhYWSis8cvsBtkHGUABfmu FTS3g64SkfFqdt7Esdhoo+weOAlY47+zyNIwFLcHzq6+V5PuKszEpZzTon7+moPr9XTf gtcq2Fvvs0wyd+bheDW4W1ct686WwE4XjTDHtu+zzZWrFwolcgwQf+CTuXN2oeWrSgtW Su2iWUdmX1yCyw8ATYZbZOK8D3kgR0fvxEI9ZTxzsqgWUusBK0qm2KRIv0CeNGnfoCTS NKHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=7gM7qdyoxou8DXaWZqCWLWUhT/i75pvKGchIJAeNakw=; b=fiXJreHGxc1ws5eM9qHTnhdO1ic0+upUmmGv9yiSpM7UvPSpUwmxesGv753Y1aTXCV wwheQCzGLflWh41E2WQ7HLO3hsJ9AixatU0nrwehTbQKvgwh92BfjzVRP+Z7CRAIisGL xRzDe1/ZgbqIWZ+YX6Gi1auxb+tQkE2I0Fe2HvklNV42yVWGB7blwCtcANLYkWSDwAG2 Fc1PGD8WdbnKRm+piGi/dxAqkaD7TFB12ywmyY77lhVFdRardffwxTXEilqe2zdHqy3m mBpkrqlo680vu5vkQ9HqUh9XtKZxWOAfR+WD2K/jlNfzkBsKBWmOMDD7lTDJeVHWzmZc zzkA== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z191si485831pgd.572.2019.07.19.07.30.00; Fri, 19 Jul 2019 07:30:16 -0700 (PDT) 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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729596AbfGSO3J (ORCPT + 99 others); Fri, 19 Jul 2019 10:29:09 -0400 Received: from mx2.suse.de ([195.135.220.15]:40510 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729465AbfGSO3J (ORCPT ); Fri, 19 Jul 2019 10:29:09 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id AE41BB061; Fri, 19 Jul 2019 14:29:07 +0000 (UTC) Date: Fri, 19 Jul 2019 16:29:06 +0200 From: Michal Hocko To: Waiman Long Cc: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Roman Gushchin , Johannes Weiner , Shakeel Butt , Vladimir Davydov Subject: Re: [PATCH v2 2/2] mm, slab: Show last shrink time in us when slab/shrink is read Message-ID: <20190719142906.GU30461@dhcp22.suse.cz> References: <20190717202413.13237-1-longman@redhat.com> <20190717202413.13237-3-longman@redhat.com> <20190719061410.GJ30461@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 19-07-19 10:07:20, Waiman Long wrote: > On 7/19/19 2:14 AM, Michal Hocko wrote: > > On Wed 17-07-19 16:24:13, Waiman Long wrote: > >> The show method of /sys/kernel/slab//shrink sysfs file currently > >> returns nothing. This is now modified to show the time of the last > >> cache shrink operation in us. > > Isn't this something that tracing can be used for without any kernel > > modifications? > > That is true, but it will be a bit more cumbersome to get the data. I have no say for this code but if there is a way to capture timing data I prefer to rely on the tracing infrastructure. If the current tooling makes it cumbersome to get then this is a good reason to ask for a less cumbersome way. On the other hand, if you somehow hardwire it to a user visible interface then you just establish ABI which might stand in way for potential/future development. So take it as my 2c -- Michal Hocko SUSE Labs