From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f72.google.com (mail-wm0-f72.google.com [74.125.82.72]) by kanga.kvack.org (Postfix) with ESMTP id D4FEE6B0069 for ; Tue, 7 Feb 2017 04:46:15 -0500 (EST) Received: by mail-wm0-f72.google.com with SMTP id r18so24353254wmd.1 for ; Tue, 07 Feb 2017 01:46:15 -0800 (PST) Received: from outbound-smtp06.blacknight.com (outbound-smtp06.blacknight.com. [81.17.249.39]) by mx.google.com with ESMTPS id l2si4389580wrc.6.2017.02.07.01.46.14 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 07 Feb 2017 01:46:14 -0800 (PST) Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp06.blacknight.com (Postfix) with ESMTPS id 7B70398BAE for ; Tue, 7 Feb 2017 09:46:14 +0000 (UTC) Date: Tue, 7 Feb 2017 09:46:13 +0000 From: Mel Gorman Subject: Re: mm: deadlock between get_online_cpus/pcpu_alloc Message-ID: <20170207094613.svdhedw6u6cuvgif@techsingularity.net> References: <20170206220530.apvuknbagaf2rdlw@techsingularity.net> <20170207084855.GC5065@dhcp22.suse.cz> <614e9873-c894-de42-a38a-1798fc0be039@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <614e9873-c894-de42-a38a-1798fc0be039@suse.cz> Sender: owner-linux-mm@kvack.org List-ID: To: Vlastimil Babka Cc: Michal Hocko , Dmitry Vyukov , Tejun Heo , Christoph Lameter , "linux-mm@kvack.org" , LKML , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , syzkaller , Andrew Morton On Tue, Feb 07, 2017 at 10:23:31AM +0100, Vlastimil Babka wrote: > > > cpu offlining. I have to check the code but my impression was that WQ > > code will ignore the cpu requested by the work item when the cpu is > > going offline. If the offline happens while the worker function already > > executes then it has to wait as we run with preemption disabled so we > > should be safe here. Or am I missing something obvious? > > Tejun suggested an alternative solution to avoiding get_online_cpus() in > this thread: > https://lkml.kernel.org/r/<20170123170329.GA7820@htj.duckdns.org> I was hoping it would not really be necessary to sync against the cpu offline callback if we know we don't really have to guarantee we run on the correct CPU. -- Mel Gorman SUSE Labs -- 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