Re: [RFC 0/3] Pin page control subsystem

From: Christoph Lameter
Date: Wed Aug 14 2013 - 13:04:13 EST


On Thu, 15 Aug 2013, Minchan Kim wrote:

> When I look API of mmu_notifier, it has mm_struct so I guess it works
> for only user process. Right?

Correct. A process must have mapped the pages. If you can get a
kernel "process" to work then that process could map the pages.

> If so, I need to register it without user conext because zram, zswap
> and zcache works for only kernel side.

Hmmm... Ok but that now gets the complexity of page pinnning up to a very
weird level. Is there some way we can have a common way to deal with the
various ways that pinning is needed? Just off the top of my head (I may
miss some use cases) we have

1. mlock from user space
2. page pinning for reclaim
3. Page pinning for I/O from device drivers (like f.e. the RDMA subsystem)
4. Page pinning for low latency operations
5. Page pinning for migration
6. Page pinning for the perf buffers.
7. Page pinning for cross system access (XPMEM, GRU SGI)

Now we have another subsystem wanting different semantics of pinning. Is
there any way we can come up with a pinning mechanism that fits all use
cases, that is easyly understandable and maintainable?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/