Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758902AbaDXSnn (ORCPT ); Thu, 24 Apr 2014 14:43:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17327 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758869AbaDXSnh (ORCPT ); Thu, 24 Apr 2014 14:43:37 -0400 Message-ID: <53595B36.70606@redhat.com> Date: Thu, 24 Apr 2014 20:43:02 +0200 From: Denys Vlasenko User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Hidetoshi Seto , linux-kernel@vger.kernel.org CC: Frederic Weisbecker , Fernando Luis Vazquez Cao , Tetsuo Handa , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Andrew Morton , Arjan van de Ven , Oleg Nesterov Subject: Re: [PATCH 3/3] nohz: Fix iowait overcounting if iowait task migrates References: <1398279636-21503-1-git-send-email-dvlasenk@redhat.com> <1398279636-21503-3-git-send-email-dvlasenk@redhat.com> <5358C909.6010208@jp.fujitsu.com> In-Reply-To: <5358C909.6010208@jp.fujitsu.com> Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/24/2014 10:19 AM, Hidetoshi Seto wrote: > As I already mentioned in previous discussion with Peter, I have > concern here that this change might have impact on performance. > Especially in case if system is a kind of io-busy box, originally > there may be no iowait time (and possibly also no idle time). > For such case this change adds extra execution cost to manage > value of iowait_exittime which might not used. Everything has some cost. Correctness usually trumps a few extra locked bus cycles. Wouldn't it be nice if we'd know whether anyone even needs the stats? If no one going to read /proc/stat on the box, there's no point in going to all the trouble to maintain the counters... > And if we successfully found a way to get the iowait_exittime > within reasonable negligible cheap cost, then why we don't use > it for NOHZ=n kernels too? Kernels without NOHZ maintain the counters based on timer interrupt sampling. It should still work fine. > As Frederic already pointed, seqcount must be better choice. Yes, I'm switching to seqcounts. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/