Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1021183pxf; Thu, 8 Apr 2021 20:15:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwU9svxVH74Hy0/hONWt6CVZ6yJvHd+6Guev4jOu15AlxZyFhDtqSqcAd7Gv2hNWkZ6vkzL X-Received: by 2002:aa7:9a89:0:b029:200:1eed:1388 with SMTP id w9-20020aa79a890000b02902001eed1388mr10514358pfi.79.1617938124914; Thu, 08 Apr 2021 20:15:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617938124; cv=none; d=google.com; s=arc-20160816; b=nNrS4HkWIpS3frPVJfUt29tgz20lmNcDxLGO6zleQipI6cubdn8haiSLpcKQ2maatb qjToX+otk9/K3Z+lTW51ZPsJcliDloXhv2xi94IUyCHsjuQN9gf1D28tVNlr/H9OO3Jh Hbgd9Mb2WugsfCpiENZlpFZ5509+nfzT0IeYlykmEgjLTGDKQg8ihx4JJFvN7FVeXpY7 3TWz3AopLVjpEK84s0p4H4JBSUko/dP2tchV5mqG24kpY1QiYpnWbU9pfMlU6X3UcfDj M36HKIJafrNsZ93CgNSVUuMTNTC+HqNhnlN0DGNpyPnDYOhn+c+wuWxDQU4IHl/Jcc2z B+/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=+DOjZGX/u6rbr2K2XlXD1oEUmYKSnesPXX/ShoCtN0M=; b=I+5iIa7YXpRfWa1ulZQY18WAs3qModFEPdQ+HV+Jn1mzXluPOqzqgJqCHXxoFhxbur V3jRxH7m2wGFFrS2lwi9Ft1/RUcf+r+RXr4+ziTxRnuv9KryzpDq1ToFKu/3OFHWwYy0 lpxSSNe90w3krdPKRd9oW0hQgz8WpfaG/WqJsa82EyfwE+HL6R7h1YEHop2k0BxAFVoZ pa9HUxpSCLXk1w3sDImT9p6pOIuS0hCLpImZvRheb9iw6QA2UHDwkHlcs/0R+8r5oPdk P59uq+vO3qoWAMlAunNvBNArL/uAIUPbpaEOWuCOsrBMxpm/uxQ4m3X/jiqOzkv/46Kc oQJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NvIL21zO; 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 l125si1469111pfd.126.2021.04.08.20.15.12; Thu, 08 Apr 2021 20:15:24 -0700 (PDT) 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=NvIL21zO; 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 S233225AbhDIDN3 (ORCPT + 99 others); Thu, 8 Apr 2021 23:13:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233234AbhDIDN2 (ORCPT ); Thu, 8 Apr 2021 23:13:28 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1F4CC061761 for ; Thu, 8 Apr 2021 20:13:10 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id s11so3306958pfm.1 for ; Thu, 08 Apr 2021 20:13:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=+DOjZGX/u6rbr2K2XlXD1oEUmYKSnesPXX/ShoCtN0M=; b=NvIL21zOmeCCpYpUvhPnREkyrOsjc6hDE4wd7oEcgjEBnUjKXFuKhCvH3956iRzqDa 6jfYI7Ci7hhvI/TgSk3LDPqIO/ScZGcG1XJZrL3k24KXr8tihXsqm7PnHQZAceEXGvj/ ItQkL5tzl22HoBJu78izANiE0gu53bIOXuGSI0JSnU19pxMvnxhpMCTWMzI9co/PkbJ2 ohvt6wDatg/Py7H8bjjKeks9OEcVkw7pXd8wQIQ+PO1rRRFyR5o6zWPLOaefjZtrF4q6 DulaFT+yP3NRTKYNEEtWeQ6JkUd7ZhTOe3fQGxMp1uVO1z2svZ16gCVwIoJeL7yXFQZR RfBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+DOjZGX/u6rbr2K2XlXD1oEUmYKSnesPXX/ShoCtN0M=; b=ozonc6beiIkOz0mgbVTx2bSSyYBo2Src/CYBGXo87/Aa3dhQFugZ3z+1BekE9qCj7z ezBQM9bpfjICN2k/Wu88JZfwxOTqfkiqPmh9hxSA8c6jRc6VjMK+Z+J5iuhsJ5XNYl51 d6FpqsUk7aIPiKbeo7I6CAW9wA0lcW3qeJVLw7EUskhgZZ5wQxIqo1tV1awN61HmbLcq YliDEEM9bdpjf/9vTapK85mI5PMM0ya5dZqiyOn1z8rbnPRtynxZVe1+eNaKH4WEtRyP ynCVcReCySsjwa+W7zidsW6jy9vnp9/5oLEkMlFsyr6THt9EHX35yFkd2S/InzBx5NJu bEVw== X-Gm-Message-State: AOAM533chJFYnudBlcGYKAxSNMSiRHtc+hRw9j/s19pH5c9MH1EbCtwa tJZri6lOO8NfkVBFgwYubro= X-Received: by 2002:aa7:800c:0:b029:22d:3f81:553 with SMTP id j12-20020aa7800c0000b029022d3f810553mr10333434pfi.41.1617937990429; Thu, 08 Apr 2021 20:13:10 -0700 (PDT) Received: from [10.230.29.202] ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id b17sm664893pfv.187.2021.04.08.20.13.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Apr 2021 20:13:09 -0700 (PDT) Subject: Re: [PATCH v3] swiotlb: Make SWIOTLB_NO_FORCE perform no allocation To: Christoph Hellwig , Konrad Rzeszutek Wilk Cc: linux-kernel@vger.kernel.org, Marek Szyprowski , Robin Murphy , "open list:SWIOTLB SUBSYSTEM" References: <20210321033740.312500-1-f.fainelli@gmail.com> <20210323015350.399493-1-f.fainelli@gmail.com> <20210324084250.GA4474@lst.de> From: Florian Fainelli Message-ID: <2ad22811-24e8-0776-3e55-ea2a4ac55f55@gmail.com> Date: Thu, 8 Apr 2021 20:13:07 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: <20210324084250.GA4474@lst.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/24/2021 1:42 AM, Christoph Hellwig wrote: > On Mon, Mar 22, 2021 at 06:53:49PM -0700, Florian Fainelli wrote: >> When SWIOTLB_NO_FORCE is used, there should really be no allocations of >> default_nslabs to occur since we are not going to use those slabs. If a >> platform was somehow setting swiotlb_no_force and a later call to >> swiotlb_init() was to be made we would still be proceeding with >> allocating the default SWIOTLB size (64MB), whereas if swiotlb=noforce >> was set on the kernel command line we would have only allocated 2KB. >> >> This would be inconsistent and the point of initializing default_nslabs >> to 1, was intended to allocate the minimum amount of memory possible, so >> simply remove that minimal allocation period. >> >> Signed-off-by: Florian Fainelli > > Looks good, > > Reviewed-by: Christoph Hellwig > Thanks! Konrad, can you apply this patch to your for-linus-5.13 branch if you are also happy with it? -- Florian