From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753236AbdBHQzg (ORCPT ); Wed, 8 Feb 2017 11:55:36 -0500 Received: from merlin.infradead.org ([205.233.59.134]:52156 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752003AbdBHQze (ORCPT ); Wed, 8 Feb 2017 11:55:34 -0500 Date: Wed, 8 Feb 2017 15:11:26 +0100 From: Peter Zijlstra To: Mel Gorman Cc: Thomas Gleixner , Michal Hocko , Christoph Lameter , Vlastimil Babka , Dmitry Vyukov , Tejun Heo , "linux-mm@kvack.org" , LKML , Ingo Molnar , syzkaller , Andrew Morton Subject: Re: mm: deadlock between get_online_cpus/pcpu_alloc Message-ID: <20170208141126.GY6515@twins.programming.kicks-ass.net> References: <20170207153459.GV5065@dhcp22.suse.cz> <20170207162224.elnrlgibjegswsgn@techsingularity.net> <20170207164130.GY5065@dhcp22.suse.cz> <20170208073527.GA5686@dhcp22.suse.cz> <20170208122612.wasq72hbj4nkh7y3@techsingularity.net> <20170208140332.syic3peyfavd3kl6@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170208140332.syic3peyfavd3kl6@techsingularity.net> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 08, 2017 at 02:03:32PM +0000, Mel Gorman wrote: > > Yeah, we'll sort that out once it hits Linus tree and we move RT forward. > > Though I have once complaint right away: > > > > + preempt_enable_no_resched(); > > > > This is a nono, even in mainline. You effectively disable a preemption > > point. > > > > This came up during review on whether it should or shouldn't be a preemption > point. Initially it was preempt_enable() but a preemption point didn't > exist before, the reviewer pushed for it and as it was the allocator fast > path that was unlikely to need a reschedule or preempt, I made the change. Not relevant. The only acceptable use of preempt_enable_no_resched() is if the next statement is a schedule() variant. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f200.google.com (mail-io0-f200.google.com [209.85.223.200]) by kanga.kvack.org (Postfix) with ESMTP id 3BF746B0033 for ; Wed, 8 Feb 2017 09:11:29 -0500 (EST) Received: by mail-io0-f200.google.com with SMTP id v96so146127185ioi.5 for ; Wed, 08 Feb 2017 06:11:29 -0800 (PST) Received: from merlin.infradead.org (merlin.infradead.org. [2001:4978:20e::2]) by mx.google.com with ESMTPS id e10si14817760iod.95.2017.02.08.06.11.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Feb 2017 06:11:28 -0800 (PST) Date: Wed, 8 Feb 2017 15:11:26 +0100 From: Peter Zijlstra Subject: Re: mm: deadlock between get_online_cpus/pcpu_alloc Message-ID: <20170208141126.GY6515@twins.programming.kicks-ass.net> References: <20170207153459.GV5065@dhcp22.suse.cz> <20170207162224.elnrlgibjegswsgn@techsingularity.net> <20170207164130.GY5065@dhcp22.suse.cz> <20170208073527.GA5686@dhcp22.suse.cz> <20170208122612.wasq72hbj4nkh7y3@techsingularity.net> <20170208140332.syic3peyfavd3kl6@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170208140332.syic3peyfavd3kl6@techsingularity.net> Sender: owner-linux-mm@kvack.org List-ID: To: Mel Gorman Cc: Thomas Gleixner , Michal Hocko , Christoph Lameter , Vlastimil Babka , Dmitry Vyukov , Tejun Heo , "linux-mm@kvack.org" , LKML , Ingo Molnar , syzkaller , Andrew Morton On Wed, Feb 08, 2017 at 02:03:32PM +0000, Mel Gorman wrote: > > Yeah, we'll sort that out once it hits Linus tree and we move RT forward. > > Though I have once complaint right away: > > > > + preempt_enable_no_resched(); > > > > This is a nono, even in mainline. You effectively disable a preemption > > point. > > > > This came up during review on whether it should or shouldn't be a preemption > point. Initially it was preempt_enable() but a preemption point didn't > exist before, the reviewer pushed for it and as it was the allocator fast > path that was unlikely to need a reschedule or preempt, I made the change. Not relevant. The only acceptable use of preempt_enable_no_resched() is if the next statement is a schedule() variant. -- 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