Re: [PATCH 09/10] memory-hotplug: enable memory hotplug to handle hugepage

2013-04-09 Thread Naoya Horiguchi
On Tue, Apr 09, 2013 at 09:56:58PM -0400, KOSAKI Motohiro wrote: > On Tue, Apr 9, 2013 at 6:43 PM, Naoya Horiguchi ... > > MIGRATE_ISOLTE is changed only within the range [start_pfn, end_pfn) > > given as the argument of __offline_pages (see also > > start_isolate_page_range), > > so it's set only

Re: [PATCH 09/10] memory-hotplug: enable memory hotplug to handle hugepage

2013-04-09 Thread KOSAKI Motohiro
On Tue, Apr 9, 2013 at 6:43 PM, Naoya Horiguchi wrote: > On Tue, Apr 09, 2013 at 05:27:44PM -0400, KOSAKI Motohiro wrote: >> >> numa_node_id() is really silly. This might lead to allocate from >> >> offlining node. >> > >> > Right, it should've been alloc_huge_page(). >> > >> >> and, offline_page

Re: [PATCH 09/10] memory-hotplug: enable memory hotplug to handle hugepage

2013-04-09 Thread Naoya Horiguchi
On Tue, Apr 09, 2013 at 05:27:44PM -0400, KOSAKI Motohiro wrote: > >> numa_node_id() is really silly. This might lead to allocate from offlining > >> node. > > > > Right, it should've been alloc_huge_page(). > > > >> and, offline_pages() should mark hstate as isolated likes normal pages for > >>

Re: [PATCH 09/10] memory-hotplug: enable memory hotplug to handle hugepage

2013-04-09 Thread KOSAKI Motohiro
>> numa_node_id() is really silly. This might lead to allocate from offlining >> node. > > Right, it should've been alloc_huge_page(). > >> and, offline_pages() should mark hstate as isolated likes normal pages for >> prohibiting >> new allocation at first. > > It seems that alloc_migrate_target(

Re: [PATCH 09/10] memory-hotplug: enable memory hotplug to handle hugepage

2013-04-09 Thread Naoya Horiguchi
On Fri, Apr 05, 2013 at 08:13:47PM -0400, KOSAKI Motohiro wrote: > (3/22/13 4:23 PM), Naoya Horiguchi wrote: > > Currently we can't offline memory blocks which contain hugepages because > > a hugepage is considered as an unmovable page. But now with this patch > > series, a hugepage has become mova

Re: [PATCH 09/10] memory-hotplug: enable memory hotplug to handle hugepage

2013-04-05 Thread KOSAKI Motohiro
(3/22/13 4:23 PM), Naoya Horiguchi wrote: > Currently we can't offline memory blocks which contain hugepages because > a hugepage is considered as an unmovable page. But now with this patch > series, a hugepage has become movable, so by using hugepage migration we > can offline such memory blocks.

Re: [PATCH 09/10] memory-hotplug: enable memory hotplug to handle hugepage

2013-03-27 Thread Michal Hocko
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

Re: [PATCH 09/10] memory-hotplug: enable memory hotplug to handle hugepage

2013-03-27 Thread Naoya Horiguchi
On Wed, Mar 27, 2013 at 05:29:19PM -0400, Naoya Horiguchi 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 tha

Re: [PATCH 09/10] memory-hotplug: enable memory hotplug to handle hugepage

2013-03-27 Thread Naoya Horiguchi
On Wed, Mar 27, 2013 at 03:19:21PM +0100, Michal Hocko wrote: > On Tue 26-03-13 14:23:24, Naoya Horiguchi wrote: > > On Mon, Mar 25, 2013 at 04:09:52PM +0100, Michal Hocko wrote: > > > On Fri 22-03-13 16:23:54, Naoya Horiguchi wrote: > > ... > > > > index d9d3dd7..ef79871 100644 > > > > --- v3.9-rc

Re: [PATCH 09/10] memory-hotplug: enable memory hotplug to handle hugepage

2013-03-27 Thread Naoya Horiguchi
On Tue, Mar 26, 2013 at 05:31:51PM +0530, Aneesh Kumar K.V wrote: > Naoya Horiguchi writes: > > > +/* Returns true for head pages of in-use hugepages, otherwise returns > > false. */ > > +bool is_hugepage_movable(struct page *hpage) > > +{ > > + struct page *page; > > + struct hstate *h; > >

Re: [PATCH 09/10] memory-hotplug: enable memory hotplug to handle hugepage

2013-03-27 Thread Michal Hocko
On Tue 26-03-13 14:23:24, Naoya Horiguchi wrote: > On Mon, Mar 25, 2013 at 04:09:52PM +0100, Michal Hocko wrote: > > On Fri 22-03-13 16:23:54, Naoya Horiguchi wrote: > ... > > > index d9d3dd7..ef79871 100644 > > > --- v3.9-rc3.orig/mm/hugetlb.c > > > +++ v3.9-rc3/mm/hugetlb.c > > > @@ -844,6 +844,3

Re: [PATCH 09/10] memory-hotplug: enable memory hotplug to handle hugepage

2013-03-26 Thread Naoya Horiguchi
On Mon, Mar 25, 2013 at 04:09:52PM +0100, Michal Hocko wrote: > On Fri 22-03-13 16:23:54, Naoya Horiguchi wrote: ... > > index d9d3dd7..ef79871 100644 > > --- v3.9-rc3.orig/mm/hugetlb.c > > +++ v3.9-rc3/mm/hugetlb.c > > @@ -844,6 +844,36 @@ static int free_pool_huge_page(struct hstate *h, > > node

Re: [PATCH 09/10] memory-hotplug: enable memory hotplug to handle hugepage

2013-03-26 Thread Aneesh Kumar K.V
Naoya Horiguchi writes: > +/* Returns true for head pages of in-use hugepages, otherwise returns false. > */ > +bool is_hugepage_movable(struct page *hpage) > +{ > + struct page *page; > + struct hstate *h; > + bool ret = false; > + > + VM_BUG_ON(!PageHuge(hpage)); > + /* > +

Re: [PATCH 09/10] memory-hotplug: enable memory hotplug to handle hugepage

2013-03-25 Thread Michal Hocko
On Fri 22-03-13 16:23:54, Naoya Horiguchi wrote: > Currently we can't offline memory blocks which contain hugepages because > a hugepage is considered as an unmovable page. But now with this patch > series, a hugepage has become movable, so by using hugepage migration we > can offline such memory b

[PATCH 09/10] memory-hotplug: enable memory hotplug to handle hugepage

2013-03-22 Thread Naoya Horiguchi
Currently we can't offline memory blocks which contain hugepages because a hugepage is considered as an unmovable page. But now with this patch series, a hugepage has become movable, so by using hugepage migration we can offline such memory blocks. What's different from other users of hugepage mig