Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4054137imu; Mon, 7 Jan 2019 14:43:02 -0800 (PST) X-Google-Smtp-Source: ALg8bN6v0l5mUEZDxcu0S2PJo31/bwMfIrMC/NaffC25qO3besbggj/hgsbCc7OO4SLOQ4YHD4dW X-Received: by 2002:a63:26c1:: with SMTP id m184mr11716557pgm.367.1546900982590; Mon, 07 Jan 2019 14:43:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546900982; cv=none; d=google.com; s=arc-20160816; b=hoTJ1m+QRN1dTFMNi9dAH11JR29G8vLHhP4eNNM1ZHqOBwP8ceKUlLfVv96JRt7LIM SaFlgTtK/JaXjoV/Ek6/rOMxRGAffcdnC8AugXkKLN9AHtZA4mzeDu8EO9fMj6OwJy8U +pjPSZPH5mMUmruIwFhLclT269Hj4dy88LC2OWnnJxwgIOxiOrs1NeImOUJr/qfLNzHC v5Z7p6S4na0/dMbu7VFih8f/Ju6LehxucCmEhs/NeIu1hQiHYrf2X8EofNowhaBqJLAx Jn+culAc/5FD7BdiCMhYC3FiUZ9NrmM6aUsAhXWV6qT2ZsX9+fayJlLka1XkJyg32cEe N2hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=I6QD3wLcW1YmZ/cdQnhEAcvJ1nWOL/rceIugyNTL+2E=; b=m6jLlZPhyUW6oCX5/aNbH6WFOpZhc4HMmGJetVNpFIS4cVhjNTPVvsw+pfHCmQpHIe ejxyOOlcNM8ICCu6gQ2SjFCAJNH7K7xmIZ/xTM6Rcrme5ugNZrzlUBsN11wozB8yIiZo dBcSytRV6gu7cRkSb8+1cD94gqTQZdN5nYKRM3CSMC+zG3HO10PDLWe3a/A5ajNln3PL FalMnYPRnGcCagfWpKknRUlkBem9J2UoYbpAJPOm/RWnS01zoFO/e+uiLBYqfOFgvaDw zDOruMwYESqn7s6H6O57sGLsHxuE6/CVko/Civ0yQhPZ2Fcjx4deiqR7yfFHo7GJH+ul if8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=C6zk2l22; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s5si2119667plp.139.2019.01.07.14.42.47; Mon, 07 Jan 2019 14:43:02 -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=@google.com header.s=20161025 header.b=C6zk2l22; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727030AbfAGWlk (ORCPT + 99 others); Mon, 7 Jan 2019 17:41:40 -0500 Received: from mail-oi1-f193.google.com ([209.85.167.193]:37030 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726643AbfAGWlk (ORCPT ); Mon, 7 Jan 2019 17:41:40 -0500 Received: by mail-oi1-f193.google.com with SMTP id y23so1764560oia.4 for ; Mon, 07 Jan 2019 14:41:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=I6QD3wLcW1YmZ/cdQnhEAcvJ1nWOL/rceIugyNTL+2E=; b=C6zk2l22goz0ViBty0cM/rWBGX3hC3F6mev8zriX3VCaoVqBaXLE0G5y1IzYj4C7g0 xYD0ioCnWTYhZzMME+NEdSe5jIcL5onViRa969mcfF/N7BcKqEV/sdCdoN6Y3DwsdnWv eeUQmAuB557KTaLSjIBDtCwCh/AnQTzGQ1Zd2H1Pia5ll1rajT0PjYKovvih5navFq4J cY2kwk+rSvkQLSE+W3g5XAvq+Doy5y3KqqIa2ZGSa1/Jdw1OZb8MtzXqKYHPYDAakxyA llLi6iXVnp1pQrIFnFoyYUqWazXV83VC5dzKMkczkifd5WuGDTJEA3yFsIOTSxsdA+2O Xq6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=I6QD3wLcW1YmZ/cdQnhEAcvJ1nWOL/rceIugyNTL+2E=; b=dI6ZdLH3+ckyQJG9z2HLdUlb6ivdAv6T9TPeO9M/zuk1X5AWq6mp+nlijaV0WGW4SC 7fv2pkqDTwyxZJRU6yi+/eswsvywJdfVOyT+Vogampz5kzc8L+TB1fbyu782c+jp0MUT EYIIIq4RkBxsSCGwqbDq98//nSAHAwEoSdI2TAPlC5fmJ4UnV+sezxlafrIjaDVuhUB7 l564QcTEAsBKkZFtvFbZJe+Ar8RJWrNBS34Rca9Tf6KrtXM8iFifzfSxuqx3389E+lq3 Z+SFIlSG1rRL9FARffG0P3aMkGWedh9ZDa3naL0fAsupSy9cNMMjDhlD1UHaI8cDfM6g axuA== X-Gm-Message-State: AJcUukcqF5QND4QuiEAxHinggKZdxvx2De3ESaWKJu1qWM9LV5gfW/m5 IRpMyqcJGlLi8Y9SWGhyY7PoZehVZ50glVBOqYzh+w== X-Received: by 2002:aca:6952:: with SMTP id e79mr9690831oic.117.1546900899006; Mon, 07 Jan 2019 14:41:39 -0800 (PST) MIME-Version: 1.0 References: <1546873978-27797-1-git-send-email-longman@redhat.com> <20190107223214.GZ6311@dastard> In-Reply-To: <20190107223214.GZ6311@dastard> From: Daniel Colascione Date: Mon, 7 Jan 2019 17:41:28 -0500 Message-ID: Subject: Re: [PATCH 0/2] /proc/stat: Reduce irqs counting performance overhead To: Dave Chinner Cc: Waiman Long , Andrew Morton , Alexey Dobriyan , Luis Chamberlain , Kees Cook , Jonathan Corbet , linux-kernel , "open list:DOCUMENTATION" , Linux FS Devel , Davidlohr Bueso , Miklos Szeredi , Randy Dunlap Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 7, 2019 at 5:32 PM Dave Chinner wrote: > > On Mon, Jan 07, 2019 at 10:12:56AM -0500, Waiman Long wrote: > > As newer systems have more and more IRQs and CPUs available in their > > system, the performance of reading /proc/stat frequently is getting > > worse and worse. > > Because the "roll-your-own" per-cpu counter implementaiton has been > optimised for low possible addition overhead on the premise that > summing the counters is rare and isn't a performance issue. This > patchset is a direct indication that this "summing is rare and can > be slow" premise is now invalid. Focusing on counter performance is, IMHO, missing the mark. Even if interrupt count collection were made fast, there's *something* in any particular /proc file that a particular reader doesn't need and that, by being uselessly collected, needlessly slows that reader. There should be a general-purpose way for /proc file readers to tell the kernel which bits of information interest them on a particular read syscall sequence or particular open(2) or something. Creating a new proc file for every useful combination of attributes doesn't scale either.