From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755114AbdKBMhw (ORCPT ); Thu, 2 Nov 2017 08:37:52 -0400 Received: from mx2.suse.de ([195.135.220.15]:48228 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751931AbdKBMhu (ORCPT ); Thu, 2 Nov 2017 08:37:50 -0400 Date: Thu, 2 Nov 2017 13:37:49 +0100 From: Michal Hocko To: linux-mm@kvack.org Cc: Peter Zijlstra , Thomas Gleixner , Johannes Weiner , Mel Gorman , Tejun Heo , LKML Subject: Re: [PATCH 2/2] mm: drop hotplug lock from lru_add_drain_all Message-ID: <20171102123749.zwnlsvpoictnmp53@dhcp22.suse.cz> References: <20171102093613.3616-1-mhocko@kernel.org> <20171102093613.3616-3-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171102093613.3616-3-mhocko@kernel.org> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 02-11-17 10:36:13, Michal Hocko wrote: [...] > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 67330a438525..8c6e9c6d194c 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -6830,8 +6830,12 @@ void __init free_area_init(unsigned long *zones_size) > > static int page_alloc_cpu_dead(unsigned int cpu) > { > + unsigned long flags; > > + local_irq_save(flags); > lru_add_drain_cpu(cpu); > + local_irq_restore(flags); > + > drain_pages(cpu); I was staring into the hotplug code and tried to understand the context this callback runs in and AFAIU IRQ disabling is not needed at all because cpuhp_thread_fun runs with IRQ disabled when offlining an online cpu. I have a bit hard time to follow the code due to all the indirection so please correct me if I am wrong. -- Michal Hocko SUSE Labs