From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:58574 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727111AbfAISDf (ORCPT ); Wed, 9 Jan 2019 13:03:35 -0500 Subject: Re: [PATCH v2 0/4] /proc/stat: Reduce irqs counting performance overhead To: Matthew Wilcox Cc: Andrew Morton , Alexey Dobriyan , Kees Cook , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Davidlohr Bueso , Miklos Szeredi , Daniel Colascione , Dave Chinner , Randy Dunlap References: <1547054628-12703-1-git-send-email-longman@redhat.com> <20190109174403.GN6310@bombadil.infradead.org> From: Waiman Long Message-ID: Date: Wed, 9 Jan 2019 13:03:33 -0500 MIME-Version: 1.0 In-Reply-To: <20190109174403.GN6310@bombadil.infradead.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Content-Language: en-US Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 01/09/2019 12:44 PM, Matthew Wilcox wrote: > On Wed, Jan 09, 2019 at 12:23:44PM -0500, Waiman Long wrote: >> This v2 patch optimizes the way the IRQ counts are retrieved and computed >> and getting rid of the sysctl parameter altogether to achieve a performance >> gain that is close to the v1 patch. This is based on the idea that while >> many IRQs can be supported by a system, only a handful of them are actually >> being used in most cases. We can save a lot of time by focusing on those >> active IRQs only and ignore the rests. > So your reaction to being told "Make this the same as every other thing > we have to sum across all CPUs" is to make it _even more different_ and > special-cased? I'm done. NAK. The paragraph above may be a bit misleading. This v2 patch actually touches very little on percpu accounting aspect of the IRQ counts. See patches 2 and 3 for the relevant changes which is just a few line of new codes. Please review the individual patches before Nak'ing. I could theoretically generalize them into a new set of percpu counting helpers, but the idea behind it is quite different from the use cases of percpu counter. So it may not be a good idea of adding it to there. Cheers, Longman