Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755880Ab1ETAFU (ORCPT ); Thu, 19 May 2011 20:05:20 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:44743 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752572Ab1ETAFT (ORCPT ); Thu, 19 May 2011 20:05:19 -0400 Date: Thu, 19 May 2011 17:04:46 -0700 From: Andrew Morton To: Daniel Kiper Cc: David Rientjes , ian.campbell@citrix.com, haicheng.li@linux.intel.com, fengguang.wu@intel.com, jeremy@goop.org, konrad.wilk@oracle.com, dan.magenheimer@oracle.com, v.tolstov@selfip.ru, pasik@iki.fi, dave@linux.vnet.ibm.com, wdauchy@gmail.com, xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH V3 2/2] mm: Extend memory hotplug API to allow memory hotplug in virtual machines Message-Id: <20110519170446.477b39ba.akpm@linux-foundation.org> In-Reply-To: <20110519232520.GB28832@router-fw-old.local.net-space.pl> References: <20110517213858.GC30232@router-fw-old.local.net-space.pl> <20110519204509.GD27202@router-fw-old.local.net-space.pl> <20110519160143.02163f36.akpm@linux-foundation.org> <20110519232520.GB28832@router-fw-old.local.net-space.pl> X-Mailer: Sylpheed 2.7.1 (GTK+ 2.18.9; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2097 Lines: 42 On Fri, 20 May 2011 01:25:20 +0200 Daniel Kiper wrote: > On Thu, May 19, 2011 at 04:01:43PM -0700, Andrew Morton wrote: > > On Thu, 19 May 2011 22:45:09 +0200 > > Daniel Kiper wrote: > > > > > On Wed, May 18, 2011 at 08:36:02PM -0700, David Rientjes wrote: > > > > On Tue, 17 May 2011, Daniel Kiper wrote: > > > > > > > > > This patch contains online_page_callback and apropriate functions for > > > > > setting/restoring online page callbacks. It allows to do some machine > > > > > specific tasks during online page stage which is required to implement > > > > > memory hotplug in virtual machines. Additionally, __online_page_set_limits(), > > > > > __online_page_increment_counters() and __online_page_free() function > > > > > was added to ease generic hotplug operation. > > > > > > > > There are several issues with this. > > > > > > > > First, this is completely racy and only allows one global callback to be > > > > in use at a time without looping, which is probably why you had to pass an > > > > > > One callback is allowed by design. Currently I do not see > > > any real usage for more than one callback. > > > > I'd suggest that you try using the notifier.h tools here and remove the > > restriction. Sure, we may never use the capability but I expect the > > code will look nice and simple and once it's done, it's done. > > Hmmm... I am a bit confused. Here https://lkml.org/lkml/2011/3/28/510 you > was against (ab)using notifiers. Here https://lkml.org/lkml/2011/3/29/313 > you proposed currently implemented solution. Maybe I missed something... > What should I do now ??? I agree that the code should look nice and simple > and once it's done, it's done. Oh, OK, the callback's role is to free a page, so there's no sens in there ever being more than a single registered callback. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/