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

2013-08-15 Thread Christoph Lameter
On Thu, 15 Aug 2013, Minchan Kim wrote: > Now mlock pages could be migrated in case of CMA so I think it's not a > big problem to migrate it for other cases. > I remember You and Peter argued what's the mlock semainc of pin POV > and as I remember correctly, Peter said mlock doesn't mean pin so >

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

2013-08-14 Thread Minchan Kim
Hey Christoph, On Wed, Aug 14, 2013 at 04:58:36PM +, Christoph Lameter wrote: > 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

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

2013-08-14 Thread Christoph Lameter
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 regis

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

2013-08-14 Thread Christoph Lameter
On Wed, 14 Aug 2013, Minchan Kim wrote: > On Tue, Aug 13, 2013 at 04:21:30PM +, Christoph Lameter wrote: > > On Tue, 13 Aug 2013, Minchan Kim wrote: > > > > > VM sometime want to migrate and/or reclaim pages for CMA, memory-hotplug, > > > THP and so on but at the moment, it could handle only u

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

2013-08-14 Thread Minchan Kim
Hi Christoph, On Wed, Aug 14, 2013 at 04:36:44PM +, Christoph Lameter wrote: > On Wed, 14 Aug 2013, Minchan Kim wrote: > > > On Tue, Aug 13, 2013 at 04:21:30PM +, Christoph Lameter wrote: > > > On Tue, 13 Aug 2013, Minchan Kim wrote: > > > > > > > VM sometime want to migrate and/or reclai

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

2013-08-13 Thread Minchan Kim
Hello Christoph, On Tue, Aug 13, 2013 at 04:21:30PM +, Christoph Lameter wrote: > On Tue, 13 Aug 2013, Minchan Kim wrote: > > > VM sometime want to migrate and/or reclaim pages for CMA, memory-hotplug, > > THP and so on but at the moment, it could handle only userspace pages > > so if above e

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

2013-08-13 Thread Minchan Kim
Hello Benjamin, On Tue, Aug 13, 2013 at 10:23:38AM -0400, Benjamin LaHaise wrote: > On Tue, Aug 13, 2013 at 11:46:42AM +0200, Krzysztof Kozlowski wrote: > > Hi Minchan, > > > > On wto, 2013-08-13 at 16:04 +0900, Minchan Kim wrote: > > > patch 2 introduce pinpage control > > > subsystem. So, subsy

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

2013-08-13 Thread Minchan Kim
Hello Krzysztof, On Tue, Aug 13, 2013 at 11:46:42AM +0200, Krzysztof Kozlowski wrote: > Hi Minchan, > > On wto, 2013-08-13 at 16:04 +0900, Minchan Kim wrote: > > patch 2 introduce pinpage control > > subsystem. So, subsystems want to control pinpage should implement own > > pinpage_xxx functions

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

2013-08-13 Thread Christoph Lameter
On Tue, 13 Aug 2013, Minchan Kim wrote: > VM sometime want to migrate and/or reclaim pages for CMA, memory-hotplug, > THP and so on but at the moment, it could handle only userspace pages > so if above example subsystem have pinned a some page in a range VM want > to migrate, migration is failed s

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

2013-08-13 Thread Benjamin LaHaise
On Tue, Aug 13, 2013 at 11:46:42AM +0200, Krzysztof Kozlowski wrote: > Hi Minchan, > > On wto, 2013-08-13 at 16:04 +0900, Minchan Kim wrote: > > patch 2 introduce pinpage control > > subsystem. So, subsystems want to control pinpage should implement own > > pinpage_xxx functions because each subsy

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

2013-08-13 Thread Krzysztof Kozlowski
Hi Minchan, On wto, 2013-08-13 at 16:04 +0900, Minchan Kim wrote: > patch 2 introduce pinpage control > subsystem. So, subsystems want to control pinpage should implement own > pinpage_xxx functions because each subsystem would have other character > so what kinds of data structure for managing pi

[RFC 0/3] Pin page control subsystem

2013-08-13 Thread Minchan Kim
!! NOTICE !! It's totally untested patchset so please AVOID real testing. I'd like to show just concept and want to discuss it on very early stage. (so there isn't enough description but I guess code is very simple so not a big problem to understand the intention). This patchset is for solving *ke