Re: [PATCH 2/3] hugetlb: fix prio_tree unit

Hugh Dickins
2006-10-25T07:41:07Z

On Wed, 25 Oct 2006, David Gibson wrote:
>
> Hugh, I'd like to add a testcase to the libhugetlbfs testsuite which
> will trigger this bug, but from the description above I'm not sure
> exactly how to tickle it. Can you give some more details of what
> sequence of calls will cause the BUG_ON() to be called.
>
> I've attached the skeleton test I have now, but I'm not sure if it's
> even close to what's really required for this.

I'll take a look, or reconstruct my own sequence, later on today and
send it just to you. The BUG_ON was not at all what I was expecting,
and I spent quite a while working out how it came about (v_offset
wrapped, so vm_start + v_offset less than vm_start, so the huge unmap
applied to a non-huge vma before it). Though I'm dubious whether it's
really worthwhile devising such a test now.

Hugh