"Bryan O'Sullivan" <[EMAIL PROTECTED]> wrote: > > On Thu, 2006-03-09 at 16:01 -0800, Roland Dreier wrote: > > Bryan> Any idea what I should be using instead? > > > > It depends what you're trying to do. Hence my original question: why > > are you doing SetPageReserved? > > We're mapping some memory that the chip DMAs to into userspace, so that > user processes can spin on memory locations without going through the > kernel. The SetPageReserved hack is an attempt to stop the VM from > reclaiming those pages from us once a user process exits.
If your driver allocated these pages and never added them to the LRU then the VM won't touch them. If your driver owns the pages and has a ref on them then they won't get freed at task exit-time. If the app owns the pages and you're using get_user_pages() then your driver owns the last ref on the pages. > I realise that it's surely bogus, and I'd be thrilled to do something > correct instead. We've tried doing both SetPageReserved and get_page, > but it hasn't work out too well so far. We'd need to see a halfway decent description of the problem first ;) _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
