From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752689AbdBIOCE (ORCPT ); Thu, 9 Feb 2017 09:02:04 -0500 Received: from resqmta-ch2-04v.sys.comcast.net ([69.252.207.36]:43260 "EHLO resqmta-ch2-04v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751667AbdBIOCB (ORCPT ); Thu, 9 Feb 2017 09:02:01 -0500 Date: Thu, 9 Feb 2017 08:00:57 -0600 (CST) From: Christoph Lameter X-X-Sender: cl@east.gentwo.org To: Thomas Gleixner cc: Michal Hocko , Mel Gorman , Vlastimil Babka , Dmitry Vyukov , Tejun Heo , "linux-mm@kvack.org" , LKML , Ingo Molnar , Peter Zijlstra , syzkaller , Andrew Morton Subject: Re: mm: deadlock between get_online_cpus/pcpu_alloc In-Reply-To: Message-ID: References: <20170207123708.GO5065@dhcp22.suse.cz> <20170207135846.usfrn7e4znjhmogn@techsingularity.net> <20170207141911.GR5065@dhcp22.suse.cz> <20170207153459.GV5065@dhcp22.suse.cz> <20170207162224.elnrlgibjegswsgn@techsingularity.net> <20170207164130.GY5065@dhcp22.suse.cz> <20170208073527.GA5686@dhcp22.suse.cz> <20170208152106.GP5686@dhcp22.suse.cz> Content-Type: text/plain; charset=US-ASCII X-CMAE-Envelope: MS4wfPsAZBtUD3DwKrNkWLvW6uJBH+CGXrmloWORQpqLJgeVGefYIhSNwfWAMg+xMfdP2RAWdV/cNRsCk3oooZ2GAJ9RU6cXlWNLoPErCuWaQEuLIybiVAXA NjeWsJE/wdVQQMsXlkzBYXpMqEB4UY+cVRwRpF9G3wwdxesgt5cSh2UiJmlM1JKurPHFZyIBgA5SbRUeA3gag5s0VdQB81pf+wtanaphkdD+Ko2IhGHQtyp2 9sSYx+x0z4KtGz4kjqcqIF4z3ttL1DTHYfWrGXOvpINrhawPSv8waRjWQ3o1RrzmEazv8gIXLlDTnOwaeyfLNy0g6fHMg0JvKtNUdAVsFFSjli+rphuN0BcE MdfQxQ0kfuVo7lyndLMOy+ATLQqFdqUcgX9+SsT633+Ke2TzQP7v7lnthhUjw5Y8FTw7QAAxL/NMo88k+EpohQKu3dtGUlAw3VAGfoYtj7Md1kKTkq5XUImr ypQeUaWIYj7XQXIef3MtXs+aBt3d1v681Qb3fQ== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 9 Feb 2017, Thomas Gleixner wrote: > And how does that solve the problem at hand? Not at all: > > CPU 0 CPU 1 > > for_each_online_cpu(cpu) > ==> cpu = 1 > stop_machine() > set_cpu_online(1, false) > queue_work(cpu1) > > Thanks, Well thats not how I remember stop_machine does work. Doesnt it stop the processing on all cpus otherwise its not a real usable stop. The stop_machine would need to ensure that all cpus cease processing before proceeding. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f70.google.com (mail-it0-f70.google.com [209.85.214.70]) by kanga.kvack.org (Postfix) with ESMTP id 12F3F6B0387 for ; Thu, 9 Feb 2017 09:01:01 -0500 (EST) Received: by mail-it0-f70.google.com with SMTP id e137so26079864itc.0 for ; Thu, 09 Feb 2017 06:01:01 -0800 (PST) Received: from resqmta-ch2-03v.sys.comcast.net (resqmta-ch2-03v.sys.comcast.net. [2001:558:fe21:29:69:252:207:35]) by mx.google.com with ESMTPS id p200si17901866ioe.86.2017.02.09.06.01.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Feb 2017 06:01:00 -0800 (PST) Date: Thu, 9 Feb 2017 08:00:57 -0600 (CST) From: Christoph Lameter Subject: Re: mm: deadlock between get_online_cpus/pcpu_alloc In-Reply-To: Message-ID: References: <20170207123708.GO5065@dhcp22.suse.cz> <20170207135846.usfrn7e4znjhmogn@techsingularity.net> <20170207141911.GR5065@dhcp22.suse.cz> <20170207153459.GV5065@dhcp22.suse.cz> <20170207162224.elnrlgibjegswsgn@techsingularity.net> <20170207164130.GY5065@dhcp22.suse.cz> <20170208073527.GA5686@dhcp22.suse.cz> <20170208152106.GP5686@dhcp22.suse.cz> Content-Type: text/plain; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Thomas Gleixner Cc: Michal Hocko , Mel Gorman , Vlastimil Babka , Dmitry Vyukov , Tejun Heo , "linux-mm@kvack.org" , LKML , Ingo Molnar , Peter Zijlstra , syzkaller , Andrew Morton On Thu, 9 Feb 2017, Thomas Gleixner wrote: > And how does that solve the problem at hand? Not at all: > > CPU 0 CPU 1 > > for_each_online_cpu(cpu) > ==> cpu = 1 > stop_machine() > set_cpu_online(1, false) > queue_work(cpu1) > > Thanks, Well thats not how I remember stop_machine does work. Doesnt it stop the processing on all cpus otherwise its not a real usable stop. The stop_machine would need to ensure that all cpus cease processing before proceeding. -- 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