Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp613792pxb; Wed, 27 Jan 2021 16:49:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJwOlzBRYj8+rF9meUyHWXz/1sZhowL1NZ5Dy0awLFADdUFGiRIGkx/rMX7VFzJTWLrCPzA3 X-Received: by 2002:aa7:cad5:: with SMTP id l21mr11088661edt.96.1611794946757; Wed, 27 Jan 2021 16:49:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611794946; cv=none; d=google.com; s=arc-20160816; b=QU25EaUC6lYmPsOkE13Ye16+n8xWPJDQDqloHUQ13IKFc//un7HMYqK6+hpwlnxk/+ 4vA2rfWctui3OkucPD0x8NlV7X7djVyR73K8Grt6vGEk7q/O2ZeliE/cK2eF82q0Fwfk D4Ntq72rRSo7WTxXXFkqqvpB5w2HbUBF2azjKW0Rfj9tB6j1u1vz+9J50phJ+q5X/Kvu FE4zpHBZ2/0Y8zR6z9enc/MCg5CSChAYMfLyZd73MwoLGP0/dfHZipXAyWZ9ZQowfJBt juZ2tClZ0Q+zV3T3c7L6tHaAO/jUMpe0OdeNKFGIQEieR9cn/nyZGrDJ7VbIaT+wEn6Y 89Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id :mime-version:in-reply-to:references:cc:to:subject:from:date :dkim-signature; bh=Mxms3zmarGgtqLSA2knr9DFUQbJNpMaXiC1Rwt/vXfQ=; b=jjkC8wrauJDdVtMm5se00HG0RYV3IHOGw+5hYfS2J19NEZ2c+mAE8cYhVfDzjQkwaz R+hMdDwQV/JNX4wtohkKrh0h70u6ItfId8GcHXNL+kpCa8R8gh4hT9UwnVryI2tYurgI SB7ltq/0ATMRm+Qomd2fnrWx5IYeiSyywPO1+FMcUSuKETC2XVtkEp6Pjzr6RYChJX+q 6T7Ge79w8M589KA6m7Y6myfuCvgXoAIBxwuKkP5eEo9ZhWefdBWdYsMa/PGVMY7j6mnr WTnZKfFrJBxVCzX+rDB9dZoP6ER611LUm5ehbhdo+CUiP2BjT4+H6g+/x7G4U9feyGlk aMMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Rk78kGbT; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a73si2011135edf.23.2021.01.27.16.48.42; Wed, 27 Jan 2021 16:49:06 -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=@gmail.com header.s=20161025 header.b=Rk78kGbT; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231268AbhA0XrO (ORCPT + 99 others); Wed, 27 Jan 2021 18:47:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234216AbhA0XpC (ORCPT ); Wed, 27 Jan 2021 18:45:02 -0500 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15B1AC0613ED for ; Wed, 27 Jan 2021 15:44:22 -0800 (PST) Received: by mail-pl1-x62f.google.com with SMTP id r4so2066636pls.11 for ; Wed, 27 Jan 2021 15:44:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:cc:references:in-reply-to:mime-version :message-id:content-transfer-encoding; bh=Mxms3zmarGgtqLSA2knr9DFUQbJNpMaXiC1Rwt/vXfQ=; b=Rk78kGbTRTMsJht7TyBKfA+4NY6T9q1+B9xyRJPxErypmxzfFg1Nv607eX/zhWOilm xIF2iZKJNNs0OizLmf5xQchxGNztXdG+MejWZt4vq9jUdoGE3p13+Ow2gj+UnyxxLMZh 820dcly26qnDHkf+TMfpinOCa5mKEnv3EoTWeuKmPOAvBVp5douEF2TFDaFVJX8O7Aqa LcCdL+M1mXHI1pP2L6BrJGNIOAtJvb/1syYMNQ758u8UN2y9var1hizA1oYqPNmZo61S 0CFz4y8J5l+Bepx+5SfQ3rwd+HCH5CXiUK0kK8LHvswJ70Tr3B7u0ognkccOZsO5ruRp /QEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:message-id:content-transfer-encoding; bh=Mxms3zmarGgtqLSA2knr9DFUQbJNpMaXiC1Rwt/vXfQ=; b=Vq+1XSgC4t7WzRjNI5X0kY1UDV8yzn9dqRfjwuMjfMwjpG/rkeei1AiqhhFyuGhdnY Zv25LUAaApFGAgmnCpQlrGGwhJ2kPmQcnNWg3kQLyWxW6z5jyfqrtxnmlxFurODGFi6s JGBC5DoWCAUrNV5eUwIROv7UjtWmNiJBuAcfbZ+0DgcW76uB1rSRYhyWIQlxGuUeNyaX 4W/fJxLbz+Fdj7toQvKFnW+L0llRyOZb0vwwle4HxuzazlBMQA4bpkIexpKIM5iiBbhB BuVnPs1TDT64G2X+ofgqr5+a356Fc2ylYLam65A7Jjg37uI3Ysmsta2jksk7sAaK1/jE HMhQ== X-Gm-Message-State: AOAM530FT6nHFoq1icmYuMkVHeJigc9EXZXM3MUY5RO2tit8kfHObDZD N4Wbsgncx72DFmSxwh+2yJo= X-Received: by 2002:a17:90b:1004:: with SMTP id gm4mr8190388pjb.97.1611791061723; Wed, 27 Jan 2021 15:44:21 -0800 (PST) Received: from localhost (192.156.221.203.dial.dynamic.acc50-nort-cbr.comindico.com.au. [203.221.156.192]) by smtp.gmail.com with ESMTPSA id r14sm3828769pgi.27.2021.01.27.15.44.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jan 2021 15:44:21 -0800 (PST) Date: Thu, 28 Jan 2021 09:44:15 +1000 From: Nicholas Piggin Subject: Re: [PATCH 2/5] kernel/dma: remove unnecessary unmap_kernel_range To: Christoph Hellwig , Konrad Rzeszutek Wilk Cc: Andrew Morton , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Robin Murphy References: <20210126045404.2492588-1-npiggin@gmail.com> <20210126045404.2492588-3-npiggin@gmail.com> <20210127071059.GA21133@lst.de> In-Reply-To: <20210127071059.GA21133@lst.de> MIME-Version: 1.0 Message-Id: <1611790740.civn6atbwp.astroid@bobo.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Excerpts from Christoph Hellwig's message of January 27, 2021 5:10 pm: > On Tue, Jan 26, 2021 at 05:08:46PM -0500, Konrad Rzeszutek Wilk wrote: >> On Tue, Jan 26, 2021 at 02:54:01PM +1000, Nicholas Piggin wrote: >> > vunmap will remove ptes. >>=20 >> Should there be some ASSERT after the vunmap to make sure that is the >> case?=20 >=20 > Not really. removing the PTEs is the whole point of vunmap. Everything > else is just house keeping. Agree. I did double check this and wrote a quick test to check ptes were=20 there before the vunmap and cleared after, just to make sure I didn't=20 make a silly mistake with the patch. But in general drivers should be=20 able to trust code behind the API call will do the right thing. Such=20 assertions should go in the vunmap() implementation as appropriate. Thanks, Nick