RFC: Block reservation for hugetlbfs
Subsystems (3)
These days, hugepages are demand-allocated at first fault time. There's a somewhat dubious (and racy) heuristic when making a new mmap() to check if there are enough available hugepages to fully satisfy that mapping.
A particularly obvious case where the heuristic breaks down is where a process maps its hugepages not as a single chunk, but as a bunch of individually mmap()ed (or shmat()ed) blocks without touching and instantiating the blocks in between allocations. In this case the size of each block is compared against the total number of available hugepages. It's thus easy for the process to become overcommitted, because each block mapping will succeed, although the total number of hugepages required by all blocks exceeds the number available. In particular, this defeats such a program which will detect a mapping failure and adjust its hugepage usage downward accordingly.
The patch below is a draft attempt to address this problem, by strictly reserving a number of physical hugepages for hugepages inodes which have been mapped, but not instatiated. MAP_SHARED mappings are thus "safe" - they will fail on mmap(), not later with a SIGBUS. MAP_PRIVATE mappings can still SIGBUS.
This patch appears to address the problem at hand - it allows DB2 to start correctly, for instance, which previously suffered the failure described above. I'm almost certain I'm missing some locking or other synchronization - I am entirely bewildered as to what I need to hold to safely update i_blocks as below. Corrections for my ignorance solicited...
mm/hugetlb.c +73 -5
@@ -20,7 +20,7 @@#include <linux/hugetlb.h> const unsigned long hugetlb_zero =0 , hugetlb_infinity = ~0UL ; -static unsigned long nr_huge_pages, free_huge_pages; +static unsigned long nr_huge_pages, free_huge_pages, reserved_huge_pages;unsigned long max_huge_pages;static struct list_head hugepage_freelists[MAX_NUMNODES ];static unsigned int nr_huge_pages_node[MAX_NUMNODES ];
@@ -94,21 +94,87 @@ void free_huge_page(struct page *page)struct page *alloc_huge_page (struct vm_area_struct *vma,unsigned long addr) { +struct inode *inode = vma->vm_file->f_dentry->d_inode;struct page *page;int i; +int use_reserve =0 ; + +if (vma->vm_flags &VM_MAYSHARE ) { +unsigned long idx; + + idx = ((addr - vma->vm_start) >>HPAGE_SHIFT ) + + (vma->vm_pgoff >> (HPAGE_SHIFT -PAGE_SHIFT )); + +if (idx < inode->i_blocks) + use_reserve =1 ; + }spin_lock (&hugetlb_lock); - page =dequeue_huge_page (vma, addr); -if (!page) { -spin_unlock (&hugetlb_lock); -return NULL ; +if (! use_reserve) { +if (free_huge_pages <= reserved_huge_pages) + goto fail; + }else { + reserved_huge_pages--; } + + page =dequeue_huge_page (vma, addr); +if (!page) + goto fail; +spin_unlock (&hugetlb_lock); +set_page_count (page,1 ); page[1 ].lru.next = (void *)free_huge_page;/* set dtor */ for (i =0 ; i < (HPAGE_SIZE /PAGE_SIZE ); ++i)clear_user_highpage (&page[i], addr);return page; + + fail: +WARN_ON (use_reserve);/* reserved allocations shouldn't fail */ +spin_unlock (&hugetlb_lock); +return NULL ; +} + +int hugetlb_reserve_for_inode (struct inode *inode,unsigned long npages) +{ +struct address_space *mapping = inode->i_mapping; +unsigned long pg; +long change_in_reserve =0 ; +struct page *page; +int ret = -ENOMEM ; + +read_lock_irq (&inode->i_mapping->tree_lock); +for (pg = inode->i_blocks; pg < npages; pg++) { + page =radix_tree_lookup (&mapping->page_tree, pg); +if (! page) + change_in_reserve++; + } + +for (pg = npages; pg < inode->i_blocks; pg++) { + page =radix_tree_lookup (&mapping->page_tree, pg); +if (! page) + change_in_reserve--; + } +spin_lock (&hugetlb_lock); +if ((change_in_reserve >0 ) + && (change_in_reserve > (free_huge_pages-reserved_huge_pages))) { +printk ("Failing: change=%ld free=%lu\n" , + change_in_reserve, free_huge_pages - reserved_huge_pages); + goto out; + } + + reserved_huge_pages += change_in_reserve; + inode->i_blocks = npages; + + ret =0 ; + + out: +spin_unlock (&hugetlb_lock); +read_unlock_irq (&inode->i_mapping->tree_lock); + +/* printk("hugetlb_reserve_for_inode(.., %lu) = %d delta = %ld\n", */ +/* npages, ret, change_in_reserve); */ +return ret; }static int __init hugetlb_init (void )
@@ -225,9 +291,11 @@ int hugetlb_report_meminfo(char *buf)return sprintf (buf,"HugePages_Total: %5lu\n" "HugePages_Free: %5lu\n" +"HugePages_Rsvd: %5lu\n" "Hugepagesize: %5lu kB\n" , nr_huge_pages, free_huge_pages, + reserved_huge_pages,HPAGE_SIZE /1024 ); }
fs/hugetlbfs/inode.c +21 -53
130 lines not on this page · raw message
include/linux/hugetlb.h +1 -0
@@ -22,6 +22,7 @@ int hugetlb_report_meminfo(char *);int hugetlb_report_node_meminfo (int ,char *);int is_hugepage_mem_enough (size_t );unsigned long hugetlb_total_pages (void ); +int hugetlb_reserve_for_inode (struct inode *inode,unsigned long npages);struct page *alloc_huge_page (struct vm_area_struct *,unsigned long );void free_huge_page (struct page *); int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 22 lines · David Gibson
These days, hugepages are demand-allocated at first fault time. There's a somewhat dubious (and racy) heuristic when making a new
mmap()to check if there are enough available hugepages to fully satisfy that mapping.A particularly obvious case where the heuristic breaks down is where a process maps its hugepages not as a single chunk, but as a bunch of individually mmap()ed (or shmat()ed) blocks without touching and instantiating the blocks in between allocations. In this case the size of each block is compared against the total number of available hugepages. It's thus easy for the process to become overcommitted, because each block mapping will succeed, although the total number of hugepages required by all blocks exceeds the number available. In particular, this defeats such a program which will detect a mapping failure and adjust its hugepage usage downward accordingly.
The patch below is a draft attempt to address this problem, by strictly reserving a number of physical hugepages for hugepages inodes which have been mapped, but not instatiated.
MAP_SHAREDmappings are thus "safe" - they will fail onmmap(), not later with a SIGBUS.MAP_PRIVATEmappings can still SIGBUS.
Quoted 9 lines
This patch appears to address the problem at hand - it allows DB2 to start correctly, for instance, which previously suffered the failure described above. I'm almost certain I'm missing some locking or other synchronization - I am entirely bewildered as to what I need to hold to safely update
i_blocksas below. Corrections for my ignorance solicited...Signed-off-by David Gibson <[email protected]>
This introducestree_lock(r) -> hugetlb_lock
And we already havehugetlb_lock -> lru_lock
So we now have tree_lock(r) -> lru_lock, which would deadlock against lru_lock -> tree_lock(w), right?
From a quick glance it looks safe, but I'd _really_ rather not introduce something like this.
Signature · 2 lines
SUSE Labs, Novell Inc. Send instant messages to your online friends http://au.messenger.yahoo.com
Quoted 5 lines · David Gibson
The patch below is a draft attempt to address this problem, by strictly reserving a number of physical hugepages for hugepages inodes which have been mapped, but not instatiated.
MAP_SHAREDmappings are thus "safe" - they will fail onmmap(), not later with a SIGBUS.MAP_PRIVATEmappings can still SIGBUS.
...
Review
Quoted 13 lines
(quoted diff) +13
-0+ read_lock_irq(&inode->i_mapping->tree_lock); + for (pg = inode->i_blocks; pg < npages; pg++) { + page = radix_tree_lookup(&mapping->page_tree, pg); + if (! page) + change_in_reserve++; + } + + for (pg = npages; pg < inode->i_blocks; pg++) { + page = radix_tree_lookup(&mapping->page_tree, pg); + if (! page) + change_in_reserve--; + } + spin_lock(&hugetlb_lock);
I'm a bit confused by this. The for loops goes through and looks for pages that have indexes greater than the current i_blocks, but less than the number of pages requested by this reservation. With demand faulting, can there be holes in the file? Will this code account for them?
I think this would also be a bit more clear if the two for loops were a bit more explicit in what they are doing. The first is growing the reservation when "npages > inode->i_blocks" and the second is shrinking the reservation when "npages < inode->i_blocks", right? Is this completely clear from the code? ;)
Also, since the operation you are performing is actually counting pages in the radix tree at certain indexes, would it be sane to have a patch such as the (completely untested) attached one to do just that, but in the radix code?
-- Dave
---
memhotplug-dave/lib/radix-tree.c | 19 +++++++++++++++++-- 1 files changed, 17 insertions(+), 2 deletions(-)
lib/radix-tree.c renamed from lib/radix-tree.c~radix-tree-count +17 -2
@@ -538,7 +538,9 @@ __lookup(struct radix_tree_root *root, vfor (i = index &RADIX_TREE_MAP_MASK ; i <RADIX_TREE_MAP_SIZE ; i++) { index++;if (slot->slots[i]) { - results[nr_found++] = slot->slots[i]; +if (results) + results[nr_found] = slot->slots[i]; + nr_found++;if (nr_found == max_items) goto out; }
@@ -559,6 +561,9 @@ out:* them at *@results and returns the number of items which were placed at * *@results. * +* If *@results is NULL, the function will return a count of pages found, +* without any actual results. +* * The implementation is naive. */ unsigned int
@@ -572,10 +577,13 @@ radix_tree_gang_lookup(struct radix_treewhile (ret < max_items) {unsigned int nr_found;unsigned long next_index;/* Index of next search */ +void *cur_result =NULL ;if (cur_index > max_index)break ; - nr_found =__lookup (root, results + ret, cur_index, +if (results) + cur_result = results + ret; + nr_found =__lookup (root, cur_result, cur_index, max_items - ret, &next_index); ret += nr_found;if (next_index ==0 )
@@ -586,6 +594,13 @@ radix_tree_gang_lookup(struct radix_tree }EXPORT_SYMBOL (radix_tree_gang_lookup); +unsigned int +radix_tree_lookup_count(struct radix_tree_root *root + unsigned long first_index) +{ +return radix_tree_gang_lookup (root,NULL , first_index, ~0 ); +} +/* * FIXME: the two tag_get()s here should use find_next_bit() instead of * open-coding the search.
_
Quoted 18 lines · Dave Hansen
Quoted 5 lines · David Gibson
The patch below is a draft attempt to address this problem, by strictly reserving a number of physical hugepages for hugepages inodes which have been mapped, but not instatiated.
MAP_SHAREDmappings are thus "safe" - they will fail onmmap(), not later with a SIGBUS.MAP_PRIVATEmappings can still SIGBUS....
Quoted 11 lines
(quoted diff) +11
-0+ read_lock_irq(&inode->i_mapping->tree_lock); + for (pg = inode->i_blocks; pg < npages; pg++) { + page = radix_tree_lookup(&mapping->page_tree, pg); + if (! page) + change_in_reserve++; + } + + for (pg = npages; pg < inode->i_blocks; pg++) { + page = radix_tree_lookup(&mapping->page_tree, pg); + if (! page) + change_in_reserve--;
Quoted 8 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ } + spin_lock(&hugetlb_lock);I'm a bit confused by this. The for loops goes through and looks for pages that have indexes greater than the current
i_blocks, but less than the number of pages requested by this reservation. With demand faulting, can there be holes in the file? Will this code account for them?
There can be holes in terms of which pages are instantiated, and in terms of what's mapped but with this patch we always reserve space from the beginning of the file. This is a simplifying assumption, so that i_blocks alone can store sufficient information about what pages are pre-reserved. Otherwise we'd either need individual information about the reservation status of each page - and there's no obvious place to store it, or we'd have to deduce it in multiple places by working through each vma which might map the page. Andy Whitcroft's old hugepage strict reservation patch used the latter approach, I invented this i_blocks method because it seems to be simpler.
Quoted 5 lines
I think this would also be a bit more clear if the two for loops were a bit more explicit in what they are doing. The first is growing the reservation when "npages >
inode->i_blocks" and the second is shrinking the reservation when "npages <inode->i_blocks", right? Is this completely clear from the code? ;)
Ok, I'll add some more explanation here.
Quoted 4 lines
Also, since the operation you are performing is actually counting pages in the radix tree at certain indexes, would it be sane to have a patch such as the (completely untested) attached one to do just that, but in the radix code?
Given that the patch below seems to introduce more code that the above, but scattered across several places, and the hugepage accounting code would be its only user, I don't see the point.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 36 lines · Nick Piggin
Quoted 22 lines · David Gibson
These days, hugepages are demand-allocated at first fault time. There's a somewhat dubious (and racy) heuristic when making a new
mmap()to check if there are enough available hugepages to fully satisfy that mapping.A particularly obvious case where the heuristic breaks down is where a process maps its hugepages not as a single chunk, but as a bunch of individually mmap()ed (or shmat()ed) blocks without touching and instantiating the blocks in between allocations. In this case the size of each block is compared against the total number of available hugepages. It's thus easy for the process to become overcommitted, because each block mapping will succeed, although the total number of hugepages required by all blocks exceeds the number available. In particular, this defeats such a program which will detect a mapping failure and adjust its hugepage usage downward accordingly.
The patch below is a draft attempt to address this problem, by strictly reserving a number of physical hugepages for hugepages inodes which have been mapped, but not instatiated.
MAP_SHAREDmappings are thus "safe" - they will fail onmmap(), not later with a SIGBUS.MAP_PRIVATEmappings can still SIGBUS.Quoted 9 lines
This patch appears to address the problem at hand - it allows DB2 to start correctly, for instance, which previously suffered the failure described above. I'm almost certain I'm missing some locking or other synchronization - I am entirely bewildered as to what I need to hold to safely update
i_blocksas below. Corrections for my ignorance solicited...Signed-off-by David Gibson <[email protected]>This introduces
tree_lock(r)->hugetlb_lock
Quoted 8 lines
And we already have
hugetlb_lock->lru_lockSo we now have
tree_lock(r)->lru_lock, which would deadlock againstlru_lock->tree_lock(w), right?From a quick glance it looks safe, but I'd _really_ rather not introduce something like this.
Urg.. good point. I hadn't even thought of that consequence - I was more worried about whether I need i_lock or i_mutex to protect my updates to i_blocks.
Would hugetlb_lock -> tree_lock(r) be any preferable (I think that's a possible alternative).
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 15 lines · David Gibson
Quoted 11 lines · Nick Piggin
This introduces
tree_lock(r)->hugetlb_lockAnd we already have
hugetlb_lock->lru_lockSo we now have
tree_lock(r)->lru_lock, which would deadlock againstlru_lock->tree_lock(w), right?From a quick glance it looks safe, but I'd _really_ rather not introduce something like this.
Quoted 7 lines
Urg.. good point. I hadn't even thought of that consequence - I was more worried about whether I need
i_lockori_mutexto protect my updates toi_blocks.Would
hugetlb_lock->tree_lock(r)be any preferable (I think that's a possible alternative).
Yes I think that should avoid the introduction of new lock dependency.
Signature · 2 lines
SUSE Labs, Novell Inc. Send instant messages to your online friends http://au.messenger.yahoo.com
Quoted 20 lines · Nick Piggin
Quoted 19 lines · David Gibson
Quoted 11 lines · Nick Piggin
This introduces
tree_lock(r)->hugetlb_lockAnd we already have
hugetlb_lock->lru_lockSo we now have
tree_lock(r)->lru_lock, which would deadlock againstlru_lock->tree_lock(w), right?From a quick glance it looks safe, but I'd _really_ rather not introduce something like this.
Urg.. good point. I hadn't even thought of that consequence - I was more worried about whether I need
i_lockori_mutexto protect my updates toi_blocks.
Quoted 5 lines
Quoted 3 lines
Would
hugetlb_lock->tree_lock(r)be any preferable (I think that's a possible alternative).Yes I think that should avoid the introduction of new lock dependency.
Err... "Yes" appears to contradict the rest of you statement, since my suggestion would still introduce a lock dependency, just a different one one. It is not at all obvious to me how to avoid a lock dependency entirely.
Also, any thoughts on whether I need i_lock or i_mutex or something else would be handy..
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 29 lines · David Gibson
Quoted 27 lines · Nick Piggin
Quoted 24 lines · David Gibson
Quoted 6 lines · Nick Piggin
This introduces
tree_lock(r)->hugetlb_lockAnd we already have
hugetlb_lock->lru_lockQuoted 7 lines
So we now have
tree_lock(r)->lru_lock, which would deadlock againstlru_lock->tree_lock(w), right?From a quick glance it looks safe, but I'd _really_ rather not
introduce something like this.
Urg.. good point. I hadn't even thought of that consequence - I was more worried about whether I need
i_lockori_mutexto protect my updates toi_blocks.Would
hugetlb_lock->tree_lock(r)be any preferable (I think that's a possible alternative).
Quoted 8 lines
Quoted 1 line
Yes I think that should avoid the introduction of new lock dependency.
Err... "Yes" appears to contradict the rest of you statement, since my suggestion would still introduce a lock dependency, just a different one one. It is not at all obvious to me how to avoid a lock dependency entirely.
I mean a new core mm lock depenency (ie. lru_lock -> tree_lock).
But I must have been smoking something last night: for the life of me I can't see why I thought there was already a hugetlb_lock -> lru_lock dependency in there...?!
So I retract my statement. What you have there seems OK.
Quoted 3 lines
Also, any thoughts on whether I need
i_lockori_mutexor something else would be handy..
I'm not much of an fs guy. How come you don't use i_size?
Signature · 2 lines
SUSE Labs, Novell Inc. Send instant messages to your online friends http://au.messenger.yahoo.com
Quoted 39 lines · Nick Piggin
Quoted 29 lines · David Gibson
Quoted 27 lines · Nick Piggin
Quoted 24 lines · David Gibson
Quoted 6 lines · Nick Piggin
This introduces
tree_lock(r)->hugetlb_lockAnd we already have
hugetlb_lock->lru_lockQuoted 7 lines
So we now have
tree_lock(r)->lru_lock, which would deadlock againstlru_lock->tree_lock(w), right?From a quick glance it looks safe, but I'd _really_ rather not
introduce something like this.
Urg.. good point. I hadn't even thought of that consequence - I was more worried about whether I need
i_lockori_mutexto protect my updates toi_blocks.Would
hugetlb_lock->tree_lock(r)be any preferable (I think that's a possible alternative).Quoted 8 lines
Quoted 1 line
Yes I think that should avoid the introduction of new lock dependency.
Err... "Yes" appears to contradict the rest of you statement, since my suggestion would still introduce a lock dependency, just a different one one. It is not at all obvious to me how to avoid a lock dependency entirely.
Quoted 7 lines
I mean a new core mm lock depenency (ie.
lru_lock->tree_lock).But I must have been smoking something last night: for the life of me I can't see why I thought there was already a
hugetlb_lock->lru_lockdependency in there...?!So I retract my statement. What you have there seems OK.
Sadly, you weren't smoking something, and it's not OK. As akpm pointed out later, the lru_lock dependecy is via __free_pages() which is called from update_and_free_page() with hugetlb_lock held.
Quoted 4 lines
Quoted 2 lines
Also, any thoughts on whether I need
i_lockori_mutexor something else would be handy..I'm not much of an fs guy. How come you don't use
i_size?
i_size is already used for a hard limit on the file size - faulting a page beyond i_size will SIGBUS, whereas faulting a page beyond i_blocks just isn't guaranteed. In particular, we always extend i_size when makiing a new mapping, whereas we only extend i_blocks (and thus reserve pages) on a SHARED mapping (because space is being guaranteed for things in the mapping, not for a random processes MAP_PRIVATE copy).
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 8 lines · David Gibson
Quoted 6 lines · Nick Piggin
I mean a new core mm lock depenency (ie.
lru_lock->tree_lock).But I must have been smoking something last night: for the life of me I can't see why I thought there was already a
hugetlb_lock->lru_lockdependency in there...?!
Quoted 7 lines
Quoted 1 line
So I retract my statement. What you have there seems OK.
Sadly, you weren't smoking something, and it's not OK. As akpm pointed out later, the
lru_lockdependecy is via__free_pages()which is called fromupdate_and_free_page()withhugetlb_lockheld.
You're either thinking of zone->lock, or put_page/page_cache_release. The former is happy to nest inside anything because it is confined to page_alloc. The latter AFAIKS is not called from inside the hugepage lock.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Also, any thoughts on whether I need
i_lockori_mutexor something else would be handy..I'm not much of an fs guy. How come you don't use
i_size?
Quoted 8 lines
i_sizeis already used for a hard limit on the file size - faulting a page beyondi_sizewill SIGBUS, whereas faulting a page beyondi_blocksjust isn't guaranteed. In particular, we always extendi_sizewhen makiing a new mapping, whereas we only extendi_blocks(and thus reserve pages) on a SHARED mapping (because space is being guaranteed for things in the mapping, not for a random processesMAP_PRIVATEcopy).
Oh OK I misread how you're using it. I thought you wanted to be able to guarantee the whole thing would be guaranteed.
The other thing you might be able to do is use hugetlbfs inode private data so you don't have to overload vfs things?
Signature · 2 lines
SUSE Labs, Novell Inc. Send instant messages to your online friends http://au.messenger.yahoo.com
Quoted 12 lines · Nick Piggin
Quoted 11 lines · David Gibson
Quoted 7 lines · Nick Piggin
I mean a new core mm lock depenency (ie.
lru_lock->tree_lock).But I must have been smoking something last night: for the life of me I can't see why I thought there was already a
hugetlb_lock->lru_lockdependency in there...?!So I retract my statement. What you have there seems OK.
Quoted 8 lines
Quoted 3 lines
Sadly, you weren't smoking something, and it's not OK. As akpm pointed out later, the
lru_lockdependecy is via__free_pages()which is called fromupdate_and_free_page()withhugetlb_lockheld.You're either thinking of
zone->lock, or put_page/page_cache_release. The former is happy to nest inside anything because it is confined topage_alloc. The latter AFAIKS is not called from inside the hugepage lock.
Um.. I guess so. I know I spotted the zone->lock in the __free_pages() path, but I also thought I found the lru_lock. Can't find it now though, guess I was mistaken.
Quoted 14 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Also, any thoughts on whether I need
i_lockori_mutexor something else would be handy..I'm not much of an fs guy. How come you don't use
i_size?Quoted 7 lines
i_sizeis already used for a hard limit on the file size - faulting a page beyondi_sizewill SIGBUS, whereas faulting a page beyondi_blocksjust isn't guaranteed. In particular, we always extendi_sizewhen makiing a new mapping, whereas we only extendi_blocks(and thus reserve pages) on a SHARED mapping (because space is being guaranteed for things in the mapping, not for a random processesMAP_PRIVATEcopy).
Quoted 2 lines
Oh OK I misread how you're using it. I thought you wanted to be able to guarantee the whole thing would be guaranteed.
No. Well... "whole thing" is kind of misleading. I don't want to reserve on MAP_PRIVATE mappings (because I haven't found any semantics for that which really make any sense). But we do extend i_size on MAP_PRIVATE mappings, so we can (privately) instantiate things in that space without getting a SIGBUS.
Quoted 2 lines
The other thing you might be able to do is use hugetlbfs inode private data so you don't have to overload vfs things?
Yeah, I'm thinking that would be more sensible. Only curly bit is that it would need to be set up from fs/hugetlbfs/inode.c, but accessed from mm/hugetlb.c.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson