From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761654AbcALMCL (ORCPT ); Tue, 12 Jan 2016 07:02:11 -0500 Received: from www.linutronix.de ([62.245.132.108]:36797 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761564AbcALMCJ (ORCPT ); Tue, 12 Jan 2016 07:02:09 -0500 Date: Tue, 12 Jan 2016 13:01:09 +0100 (CET) From: Thomas Gleixner To: l@dorileo.org cc: Sebastian Andrzej Siewior , LKML , rostedt@goodmis.org, John Kacur , linux-mm@kvack.org, Leandro Dorileo Subject: Re: [RFC][4.1.15-rt17 PATCH] mm: swap: lru drain don't use workqueue with PREEMPT_RT_FULL In-Reply-To: <1452473001-10518-1-git-send-email-l@dorileo.org> Message-ID: References: <1452473001-10518-1-git-send-email-l@dorileo.org> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 10 Jan 2016, l@dorileo.org wrote: > +#ifdef CONFIG_PREEMPT_RT_FULL > +void lru_add_drain_all(void) > +{ > + static DEFINE_MUTEX(lock); > + int cpu; > + > + mutex_lock(&lock); > + get_online_cpus(); > + > + for_each_online_cpu(cpu) { > + smp_call_function_single(cpu, lru_add_drain, NULL, 1); How is that supposed to work on RT? Not at all, because lru_add_drain() takes 'sleeping' spinlocks and you cannot do that from hard interrupt context. Enable lockdep (what you should have done before posting) and watch the fireworks. Thanks, tglx