From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752754AbbCSKlR (ORCPT ); Thu, 19 Mar 2015 06:41:17 -0400 Received: from mx2.parallels.com ([199.115.105.18]:52716 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750940AbbCSKlO (ORCPT ); Thu, 19 Mar 2015 06:41:14 -0400 Date: Thu, 19 Mar 2015 13:41:03 +0300 From: Vladimir Davydov To: Cyrill Gorcunov CC: Andrew Morton , Johannes Weiner , Michal Hocko , Greg Thelen , Michel Lespinasse , David Rientjes , Pavel Emelyanov , Jonathan Corbet , , , , Subject: Re: [PATCH 3/3] mm: idle memory tracking Message-ID: <20150319104103.GA12162@esperanza> References: <0b70e70137aa5232cce44a69c0b5e320f2745f7d.1426706637.git.vdavydov@parallels.com> <20150319101205.GC27066@moon> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20150319101205.GC27066@moon> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 19, 2015 at 01:12:05PM +0300, Cyrill Gorcunov wrote: > On Wed, Mar 18, 2015 at 11:44:36PM +0300, Vladimir Davydov wrote: > > +static void set_mem_idle(void) > > +{ > > + int nid; > > + > > + for_each_online_node(nid) > > + set_mem_idle_node(nid); > > +} > > Vladimir, might we need get_online_mems/put_online_mems here, > or if node gets offline this wont be a problem? (Asking > because i don't know). I only need to dereference page structs corresponding to the node here, and page structs are not freed when the node gets offline AFAICS, so I guess it must be safe. Thanks, Vladimir