From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753458AbaG2MXK (ORCPT ); Tue, 29 Jul 2014 08:23:10 -0400 Received: from casper.infradead.org ([85.118.1.10]:36195 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753377AbaG2MXI (ORCPT ); Tue, 29 Jul 2014 08:23:08 -0400 Date: Tue, 29 Jul 2014 14:23:03 +0200 From: Peter Zijlstra To: Tejun Heo Cc: Christoph Lameter , Sasha Levin , akpm@linux-foundation.org, Gilad Ben-Yossef , Thomas Gleixner , John Stultz , Mike Frysinger , Minchan Kim , Hakan Akkan , Max Krasnyansky , Frederic Weisbecker , "Paul E. McKenney" , linux-kernel@vger.kernel.org, linux-mm@kvack.org, hughd@google.com, viresh.kumar@linaro.org, hpa@zytor.com, mingo@kernel.org Subject: Re: vmstat: On demand vmstat workers V8 Message-ID: <20140729122303.GA3935@laptop> References: <53D31101.8000107@oracle.com> <20140729075637.GA19379@twins.programming.kicks-ass.net> <20140729120525.GA28366@mtj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140729120525.GA28366@mtj.dyndns.org> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 29, 2014 at 08:05:25AM -0400, Tejun Heo wrote: > On Tue, Jul 29, 2014 at 09:56:37AM +0200, Peter Zijlstra wrote: > > On Mon, Jul 28, 2014 at 01:55:17PM -0500, Christoph Lameter wrote: > > > On Fri, 25 Jul 2014, Sasha Levin wrote: > > > > > > > This patch doesn't interact well with my fuzzing setup. I'm seeing > > > > the following: > > > > > > > > [ 490.446927] BUG: using __this_cpu_read() in preemptible [00000000] code: kworker/16:1/7368 > > > > [ 490.447909] caller is __this_cpu_preempt_check+0x13/0x20 > > > > > > __this_cpu_read() from vmstat_update is only called from a kworker that > > > is bound to a single cpu. A false positive? > > > > kworkers are never guaranteed to be so, its a 'feature' :/ > > It's because we don't distinguish work items which are per-cpu for > optimization and per-cpu for correctness and can't automatically flush > / cancel / block per-cpu work items when a cpu goes down. I like the > idea of distingushing them but it's gonna take a lot of auditing. Just force flush on unplug and fix those that complain. No auditing needed for that. > Any work item usage which requires per-cpu for correctness should > implement cpu down hook to flush in-flight work items and block > further issuance. This hasn't changed from the beginning and was > necessary even before cmwq. I think before cmwq we'd run into the broken affinity warning in the scheduler. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com [74.125.82.49]) by kanga.kvack.org (Postfix) with ESMTP id E114D6B003A for ; Tue, 29 Jul 2014 08:23:32 -0400 (EDT) Received: by mail-wg0-f49.google.com with SMTP id k14so8692837wgh.8 for ; Tue, 29 Jul 2014 05:23:30 -0700 (PDT) Received: from casper.infradead.org (casper.infradead.org. [2001:770:15f::2]) by mx.google.com with ESMTPS id bh9si39960308wjb.104.2014.07.29.05.23.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Jul 2014 05:23:19 -0700 (PDT) Date: Tue, 29 Jul 2014 14:23:03 +0200 From: Peter Zijlstra Subject: Re: vmstat: On demand vmstat workers V8 Message-ID: <20140729122303.GA3935@laptop> References: <53D31101.8000107@oracle.com> <20140729075637.GA19379@twins.programming.kicks-ass.net> <20140729120525.GA28366@mtj.dyndns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140729120525.GA28366@mtj.dyndns.org> Sender: owner-linux-mm@kvack.org List-ID: To: Tejun Heo Cc: Christoph Lameter , Sasha Levin , akpm@linux-foundation.org, Gilad Ben-Yossef , Thomas Gleixner , John Stultz , Mike Frysinger , Minchan Kim , Hakan Akkan , Max Krasnyansky , Frederic Weisbecker , "Paul E. McKenney" , linux-kernel@vger.kernel.org, linux-mm@kvack.org, hughd@google.com, viresh.kumar@linaro.org, hpa@zytor.com, mingo@kernel.org On Tue, Jul 29, 2014 at 08:05:25AM -0400, Tejun Heo wrote: > On Tue, Jul 29, 2014 at 09:56:37AM +0200, Peter Zijlstra wrote: > > On Mon, Jul 28, 2014 at 01:55:17PM -0500, Christoph Lameter wrote: > > > On Fri, 25 Jul 2014, Sasha Levin wrote: > > > > > > > This patch doesn't interact well with my fuzzing setup. I'm seeing > > > > the following: > > > > > > > > [ 490.446927] BUG: using __this_cpu_read() in preemptible [00000000] code: kworker/16:1/7368 > > > > [ 490.447909] caller is __this_cpu_preempt_check+0x13/0x20 > > > > > > __this_cpu_read() from vmstat_update is only called from a kworker that > > > is bound to a single cpu. A false positive? > > > > kworkers are never guaranteed to be so, its a 'feature' :/ > > It's because we don't distinguish work items which are per-cpu for > optimization and per-cpu for correctness and can't automatically flush > / cancel / block per-cpu work items when a cpu goes down. I like the > idea of distingushing them but it's gonna take a lot of auditing. Just force flush on unplug and fix those that complain. No auditing needed for that. > Any work item usage which requires per-cpu for correctness should > implement cpu down hook to flush in-flight work items and block > further issuance. This hasn't changed from the beginning and was > necessary even before cmwq. I think before cmwq we'd run into the broken affinity warning in the scheduler. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org