[lkml]   [2006]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 10 of 20] ipath - support for userspace apps using core driver
On Tue, 2006-03-21 at 23:20 +0000, Hugh Dickins wrote:

> Please mail me your source (I guess as a patch against 2.6.15),
> and tomorrow I'll try to see if I can work out the leak; probably
> won't work out the BUG until you can send us the messages - thanks.

Thank you for the kind offer. Before I send you anything, though, I
have some interesting information to report.

First of all, it turns out that the BUG I mentioned was reported against
the SLES10 2.6.16-rc6 kernel. I haven't had a chance to chase it down
yet, but I'm going to have to, because...

...the driver actually works just fine under 2.6.16-final. No memory
leaks, no funnies with page counting being wrong.

Under 2.6.15, what seems to be actually happening is that vmops->nopage
is being called on each page of a 32K compound page, driving the page
count from 1 (prior to any nopage calls) to 9. By the time I get to my
cleanup code, the page count has gone from 9 to 8 (whereas under 2.6.16,
the page count has gone from 9 back to 1, where it belongs). From this,
it seems fairly clear that the kernel isn't decrementing the use counts
correctly on compound pages in 2.6.15.

I think my next step, rather than boring you to tears with an
interminable slog through unfamiliar source code, is to try Linus's
suggestion from last week of just shooting nopage in the head, and
instead use remap_pfn_range in fops->mmap. If the stars are aligned,
perhaps this will give me something that works on a wide variety of

Thanks again,


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-03-22 17:01    [W:0.096 / U:6.952 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site