Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3398964pxb; Mon, 25 Jan 2021 15:21:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJyd0kvtQ5glhtXDUx54WJ4Lj/3+BStkg8B9Dfwwl739T/wEwCu7W5XxRkKEBrTIR+nJDSzz X-Received: by 2002:aa7:c9cf:: with SMTP id i15mr2383422edt.296.1611616884814; Mon, 25 Jan 2021 15:21:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611616884; cv=none; d=google.com; s=arc-20160816; b=UzTCO6/cX1YnyCgAcGGCkuYvOjO307nv85NSeeVOqx4loEMY05mSFolWvONzfpbrl7 2VRFafc+/VwkLOV8lJ95PBxrrYs8n5wzH6Zvj5yj6U2Trbji8KhlcqzI7BV8FIiew/OP EEKv5gBEIgVdkT4EdV1VptziN/0UaiVPbxwfMBMplVw7R5WstEcdQg0n1VFQTeWu4f2i J0POaAZHxC60yRglCvSjT7VZ7b8w+A1GygkdNTbb5SlClsHI9w5/IlAO8bY+eLGkl6pY 8t7VOJhZRIIpsvEIZ79WIMATCBiLFzHvvAn9Uto2f0Vnv/bEQYxElUmiLcTiYIAObEWf AYkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pr+2CvKWSXQlcfbagHzf9FCH1wHTJk+YNUukuggEowE=; b=c41y61cKr2PYdGTQYT4JR5uScc/bMNqzCbr4WKAFpSz90nTp7vEK3XmbPkN86rw9ro XSLzxqzSNVuICZ+C821s9BtOV5rUEFBHck65Y2UNPZb5RMlVyNHJjVCyMk+NBYxlfyQP h1H3Orc4ikQ/q/3tMZ9UASnvX1+PmbEu3UxDfbk+7S7QEknBk/E4MgNOLALeEx5j5160 korMCBPSeCQTyloxqb2ZgTWtRanrq+cA042iksGCXzaBDxaOablF9OTMa3+FOZRWBR67 6eo7kYf8+E+OD5YDHePOJT9jTQAbzbxOwGVSe4onyKRi8ITX0aizo5tUsOS1ZFxtZKPu MSrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=MPHMowxr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gq1si6325378ejb.675.2021.01.25.15.21.00; Mon, 25 Jan 2021 15:21:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=MPHMowxr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732629AbhAYXR2 (ORCPT + 99 others); Mon, 25 Jan 2021 18:17:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732822AbhAYXRC (ORCPT ); Mon, 25 Jan 2021 18:17:02 -0500 Received: from mail-qv1-xf2d.google.com (mail-qv1-xf2d.google.com [IPv6:2607:f8b0:4864:20::f2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07718C061574 for ; Mon, 25 Jan 2021 15:16:22 -0800 (PST) Received: by mail-qv1-xf2d.google.com with SMTP id dj6so7062311qvb.1 for ; Mon, 25 Jan 2021 15:16:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=pr+2CvKWSXQlcfbagHzf9FCH1wHTJk+YNUukuggEowE=; b=MPHMowxrctdI061dZikfB78k3kxJo7RV7pqbovUiUMGwLMx5mqeqVdd8BY75mLwS/U 86aVmxSp3sp0NfyjYsQORyQ313BLeOnaF7UX0hMGJTbhPPTepqaouuIKpVXygcWMsM4Z QsVhyYYFAeq1iiJUujMomSxuVWJUU3HZcn+eO2EOg6EaKLJhuGCMEF+aAeneZN2CZgUP GS4DEay3LHU1iFNBJ3pB0b/I8zPMgmLsSITxXEQbpsLsYzU5KZ+Gf0hjrx+zl4KQ8TkW 6K78hQCeKEqBkB2Cp6MuJB0zcVq6xgrOEn2t1t6hpBpHYXFzcBfAXmNCTo367HUJsMXA o23w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=pr+2CvKWSXQlcfbagHzf9FCH1wHTJk+YNUukuggEowE=; b=BsKg6TUldnr1afCMBw+6mMzjwTzyGlDDAhDUasAF4/8dA8GdcZvPydxmwdYpkPqceT cdkaYvnHjjZzAD0RVJPOl9VbksbbDkmbXT/z31vtttT1Z5TCkNs1pEcF5/lAqLQ19wGg +7xPkN6ZkU20LmFFes9U0nTs1YNxrOOL5JdcuAcpnLMqJTMfTT9mMlleal1MeTCamWtw ctUlOqJsE3Q2AZsiXvZUyEwmD21H+a/8hhoxk+tusdVkJMAMXzmOnXA0tHQIbCjJmGL3 AYdrKzbVHlojQuQd/IKui9whGIqikp/zh84HEGCD0nmffwKI8FAG9tiUvmI3yQVC1Sc5 ZnEg== X-Gm-Message-State: AOAM5317CHF3zGQdNjWEgbMmUQBp8bP1T0MKlPiDQVPOyoha2hUNK3fc iMm7RkFhnHT0ferixD58sZdpgA== X-Received: by 2002:a0c:c583:: with SMTP id a3mr3118919qvj.15.1611616581170; Mon, 25 Jan 2021 15:16:21 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-115-133.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.115.133]) by smtp.gmail.com with ESMTPSA id w9sm13608151qka.76.2021.01.25.15.16.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jan 2021 15:16:20 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1l4B5o-006pqt-00; Mon, 25 Jan 2021 19:16:20 -0400 Date: Mon, 25 Jan 2021 19:16:19 -0400 From: Jason Gunthorpe To: "Song Bao Hua (Barry Song)" Cc: "Wangzhou (B)" , Greg Kroah-Hartman , Arnd Bergmann , Zhangfei Gao , "linux-accelerators@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" , "iommu@lists.linux-foundation.org" , "linux-mm@kvack.org" , "Liguozhu (Kenneth)" , "chensihang (A)" Subject: Re: [RFC PATCH v2] uacce: Add uacce_ctrl misc device Message-ID: <20210125231619.GY4605@ziepe.ca> References: <1611563696-235269-1-git-send-email-wangzhou1@hisilicon.com> <20210125154717.GW4605@ziepe.ca> <96b655ade2534a65974a378bb68383ee@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <96b655ade2534a65974a378bb68383ee@hisilicon.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 25, 2021 at 10:21:14PM +0000, Song Bao Hua (Barry Song) wrote: > mlock, while certainly be able to prevent swapping out, it won't > be able to stop page moving due to: > * memory compaction in alloc_pages() > * making huge pages > * numa balance > * memory compaction in CMA Enabling those things is a major reason to have SVA device in the first place, providing a SW API to turn it all off seems like the wrong direction. If the device doesn't want to use SVA then don't use it, use normal DMA pinning like everything else. Jason