Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932951Ab3HNREJ (ORCPT ); Wed, 14 Aug 2013 13:04:09 -0400 Received: from a9-58.smtp-out.amazonses.com ([54.240.9.58]:49811 "EHLO a9-58.smtp-out.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932612Ab3HNREH (ORCPT ); Wed, 14 Aug 2013 13:04:07 -0400 X-Greylist: delayed 329 seconds by postgrey-1.27 at vger.kernel.org; Wed, 14 Aug 2013 13:04:07 EDT Date: Wed, 14 Aug 2013 16:58:36 +0000 From: Christoph Lameter To: Minchan Kim cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, k.kozlowski@samsung.com, Seth Jennings , Mel Gorman , guz.fnst@cn.fujitsu.com, Benjamin LaHaise , Dave Hansen , lliubbo@gmail.com, aquini@redhat.com, Rik van Riel Subject: Re: [RFC 0/3] Pin page control subsystem In-Reply-To: <20130814164705.GD2706@gmail.com> Message-ID: <000001407dc3c33b-4139d615-aecc-4745-a9b4-c84949f6a8f4-000000@email.amazonses.com> References: <1376377502-28207-1-git-send-email-minchan@kernel.org> <00000140787b6191-ae3f2eb1-515e-48a1-8e64-502772af4700-000000@email.amazonses.com> <20130814001236.GC2271@bbox> <000001407dafbe92-7b2b4006-2225-4f0b-b23b-d66101a995aa-000000@email.amazonses.com> <20130814164705.GD2706@gmail.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SES-Outgoing: 2013.08.14-54.240.9.58 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1380 Lines: 33 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/