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.