From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754818Ab3C0W4G (ORCPT ); Wed, 27 Mar 2013 18:56:06 -0400 Received: from mail-ea0-f176.google.com ([209.85.215.176]:50304 "EHLO mail-ea0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754439Ab3C0W4E (ORCPT ); Wed, 27 Mar 2013 18:56:04 -0400 Date: Wed, 27 Mar 2013 23:55:59 +0100 From: Michal Hocko To: Naoya Horiguchi Cc: linux-mm@kvack.org, Andrew Morton , Mel Gorman , Hugh Dickins , KOSAKI Motohiro , Andi Kleen , Hillf Danton , linux-kernel@vger.kernel.org Subject: Re: [PATCH 09/10] memory-hotplug: enable memory hotplug to handle hugepage Message-ID: <20130327225548.GA401@dhcp22.suse.cz> References: <1363983835-20184-1-git-send-email-n-horiguchi@ah.jp.nec.com> <1363983835-20184-10-git-send-email-n-horiguchi@ah.jp.nec.com> <20130325150952.GA2154@dhcp22.suse.cz> <1364322204-ah777uqs-mutt-n-horiguchi@ah.jp.nec.com> <20130327141921.GJ16579@dhcp22.suse.cz> <1364419759-a5hijyn0-mutt-n-horiguchi@ah.jp.nec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1364419759-a5hijyn0-mutt-n-horiguchi@ah.jp.nec.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 27-03-13 17:29:19, Naoya Horiguchi wrote: > On Wed, Mar 27, 2013 at 03:19:21PM +0100, Michal Hocko wrote: [...] > > If we made sure that all page on the hugepage_freelists have reference > > 0 (which is now not the case and it is yet another source of confusion) > > then the whole loop could be replaced by page_count check. > > I think that free hugepages have refcount 0, You are right. For some reason I totally missed that we drop the reference from page allocator (put_page_testzero in gather_surplus_pages). Sorry about the stupit question. -- Michal Hocko SUSE Labs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx199.postini.com [74.125.245.199]) by kanga.kvack.org (Postfix) with SMTP id E4C296B0005 for ; Wed, 27 Mar 2013 18:56:03 -0400 (EDT) Received: by mail-ea0-f181.google.com with SMTP id z10so3588641ead.12 for ; Wed, 27 Mar 2013 15:56:02 -0700 (PDT) Date: Wed, 27 Mar 2013 23:55:59 +0100 From: Michal Hocko Subject: Re: [PATCH 09/10] memory-hotplug: enable memory hotplug to handle hugepage Message-ID: <20130327225548.GA401@dhcp22.suse.cz> References: <1363983835-20184-1-git-send-email-n-horiguchi@ah.jp.nec.com> <1363983835-20184-10-git-send-email-n-horiguchi@ah.jp.nec.com> <20130325150952.GA2154@dhcp22.suse.cz> <1364322204-ah777uqs-mutt-n-horiguchi@ah.jp.nec.com> <20130327141921.GJ16579@dhcp22.suse.cz> <1364419759-a5hijyn0-mutt-n-horiguchi@ah.jp.nec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1364419759-a5hijyn0-mutt-n-horiguchi@ah.jp.nec.com> Sender: owner-linux-mm@kvack.org List-ID: To: Naoya Horiguchi Cc: linux-mm@kvack.org, Andrew Morton , Mel Gorman , Hugh Dickins , KOSAKI Motohiro , Andi Kleen , Hillf Danton , linux-kernel@vger.kernel.org On Wed 27-03-13 17:29:19, Naoya Horiguchi wrote: > On Wed, Mar 27, 2013 at 03:19:21PM +0100, Michal Hocko wrote: [...] > > If we made sure that all page on the hugepage_freelists have reference > > 0 (which is now not the case and it is yet another source of confusion) > > then the whole loop could be replaced by page_count check. > > I think that free hugepages have refcount 0, You are right. For some reason I totally missed that we drop the reference from page allocator (put_page_testzero in gather_surplus_pages). Sorry about the stupit question. -- Michal Hocko 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