From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934441Ab3GRUwA (ORCPT ); Thu, 18 Jul 2013 16:52:00 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34811 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933220Ab3GRUv7 (ORCPT ); Thu, 18 Jul 2013 16:51:59 -0400 Date: Thu, 18 Jul 2013 13:51:57 -0700 From: Andrew Morton To: Ingo Molnar Cc: Dave Hansen , linux-kernel@vger.kernel.org, x86@kernel.org, linux-mm@kvack.org, Peter Zijlstra Subject: Re: [RESEND][PATCH] mm: vmstats: tlb flush counters Message-Id: <20130718135157.2262e28b2c6e0f43a4d0fe7a@linux-foundation.org> In-Reply-To: <20130717072100.GA14359@gmail.com> References: <20130716234438.C792C316@viggo.jf.intel.com> <20130717072100.GA14359@gmail.com> X-Mailer: Sylpheed 3.2.0beta5 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 17 Jul 2013 09:21:00 +0200 Ingo Molnar wrote: > > * Dave Hansen wrote: > > > I was investigating some TLB flush scaling issues and realized > > that we do not have any good methods for figuring out how many > > TLB flushes we are doing. > > > > It would be nice to be able to do these in generic code, but the > > arch-independent calls don't explicitly specify whether we > > actually need to do remote flushes or not. In the end, we really > > need to know if we actually _did_ global vs. local invalidations, > > so that leaves us with few options other than to muck with the > > counters from arch-specific code. Spose so, if you really think it's worth it. It's all downside for uniprocessor machines. And for architectures which don't implement the counters, of course. > > --- linux.git/include/linux/vm_event_item.h~tlb-vmstats 2013-07-16 16:41:56.478280438 -0700 > > +++ linux.git-davehans/include/linux/vm_event_item.h 2013-07-16 16:41:56.483280658 -0700 > > @@ -70,6 +70,11 @@ enum vm_event_item { PGPGIN, PGPGOUT, PS > > THP_ZERO_PAGE_ALLOC, > > THP_ZERO_PAGE_ALLOC_FAILED, > > #endif > > > > + NR_TLB_REMOTE_FLUSH, /* cpu tried to flush others' tlbs */ > > + NR_TLB_REMOTE_FLUSH_RECEIVED,/* cpu received ipi for flush */ > > + NR_TLB_LOCAL_FLUSH_ALL, > > + NR_TLB_LOCAL_FLUSH_ONE, > > + NR_TLB_LOCAL_FLUSH_ONE_KERNEL, > > Please fix the vertical alignment of comments. I looked - this isn't practical. It would be nice to actually document these things though. We don't *have* to squeeze the comment into the RHS.