From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753832AbdBGJqU (ORCPT ); Tue, 7 Feb 2017 04:46:20 -0500 Received: from outbound-smtp08.blacknight.com ([46.22.139.13]:48202 "EHLO outbound-smtp08.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753801AbdBGJqQ (ORCPT ); Tue, 7 Feb 2017 04:46:16 -0500 Date: Tue, 7 Feb 2017 09:46:13 +0000 From: Mel Gorman 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 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> User-Agent: Mutt/1.6.2 (2016-07-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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