From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: Running DPDK as an unprivileged user Date: Sun, 05 Nov 2017 01:17:33 +0100 Message-ID: <2179627.cU6MQpMJOa@xps> References: <1483044080.11975.1.camel@intel.com> <1483565664.9482.3.camel@intel.com> <6c6766f0-145e-9354-e275-d107d69173c3@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: "Tan, Jianfeng" , "Walker, Benjamin" , sergio.gonzalez.monroy@intel.com, anatoly.burakov@intel.com Return-path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 04DB81B2FA for ; Sun, 5 Nov 2017 01:17:37 +0100 (CET) In-Reply-To: <6c6766f0-145e-9354-e275-d107d69173c3@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, restarting an old topic, 05/01/2017 16:52, Tan, Jianfeng: > On 1/5/2017 5:34 AM, Walker, Benjamin wrote: > >>> Note that this > >>> probably means that using uio on recent kernels is subtly > >>> broken and cannot be supported going forward because there > >>> is no uio mechanism to pin the memory. > >>> > >>> The first open question I have is whether DPDK should allow > >>> uio at all on recent (4.x) kernels. My current understanding > >>> is that there is no way to pin memory and hugepages can now > >>> be moved around, so uio would be unsafe. What does the > >>> community think here? > > Back to this question, removing uio support in DPDK seems a little > overkill to me. Can we just document it down? Like, firstly warn users > do not invoke migrate_pages() or move_pages() to a DPDK process; as for > the kcompactd daemon and some more cases (like compaction could be > triggered by alloc_pages()), could we just recommend to disable > CONFIG_COMPACTION? We really need to better document the limitations of UIO. May we have some suggestions here? > Another side, how does vfio pin those memory? Through memlock (from code > in vfio_pin_pages())? So why not just mlock those hugepages? Good question. Why not mlock the hugepages?