Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1199050pxb; Mon, 11 Oct 2021 00:05:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuoWn/4NsTbtSEHNEdUQh1ma3E+Nb8jBziFpR5/tWVYFEsiqy0YZS//zEJPQ+BgrkKs3pP X-Received: by 2002:a05:6402:350c:: with SMTP id b12mr39309992edd.244.1633935949870; Mon, 11 Oct 2021 00:05:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633935949; cv=none; d=google.com; s=arc-20160816; b=mOqSAPxKzF1BEijJwOE0W+fISdfeHmSUjMXsYp5YViAuLUBYOhoz6pRkk58w3GYw83 xL4Jkja55IXIgM6e2/McIxgDM1K2rylGBaF2KfOddfCjsoW8/4sTXaXJxBY3bH91sWFd jkoQUskPku5U4mdTVKhajS4yd0NoHJ4udT6Ycg8fLKY+R5/HPkfyqlW8lSFR/iyCm9Tc g9xbeWYJoBu0qpV2hSaCxArmjEq7mH5tn/D4dheyQSPRJIr5yxHZjcfJNRy/uGqJuXga yHE5igY82oMKV355LmQ8JO6pmc55tvAxkmYne4xHNWTpu1ntVBCE/rUVYbAV/vIkR0zi 5bxg== 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=itmTim8I8t0MywMgjw5ukf6bQm80r6xY66lzHRGBkrU=; b=ON41mnBTEXtegnOdnTMa0n2RYctAiYQgRFLMwj7QvpKatOo0QcROJNqzpyi3ij/mIl q1QK8ypGjcGPVWQTvxuMvQs2FRvvV/r37mvpeyFcfgYWUxuCKmO0sOR/Ekw5kIsfqYLY LebcySpyEkjTYL1gAzbDnxDajxfk1IE/ECYcEQsafUUNqdRzEFDYULzuU/KBeeIqXLJ7 38uN3C/39PVLkeJ/KSN9ppmLxvJJbv6UUdAH9ZXc0+yJnH/Cuae75nN6cpn3qkfK2yDX S/gq+xfoGY3hPW7+uwef+/B+TeuawxYRNO141T3/kg0M4lnl1Xgqch2bH2QlmQ0qy1wH yOiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=JaADK9WM; 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 hq16si15804564ejc.29.2021.10.11.00.05.26; Mon, 11 Oct 2021 00:05:49 -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=@infradead.org header.s=casper.20170209 header.b=JaADK9WM; 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 S234278AbhJKGqR (ORCPT + 99 others); Mon, 11 Oct 2021 02:46:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229797AbhJKGqQ (ORCPT ); Mon, 11 Oct 2021 02:46:16 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C35A0C061570; Sun, 10 Oct 2021 23:44:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=itmTim8I8t0MywMgjw5ukf6bQm80r6xY66lzHRGBkrU=; b=JaADK9WMrPpNoBBHBl9idRMMuD BYqj3G7RrDho83bp87br+1sUORGJ+B66XPhavXtKJhRBH53kPDL10sxYORJ510EH72BCXUB3MfrrP v6PWIYIV5lMVSharrgDeJrRKyDrl8BAXI2aSz9dCmIhjMP5b/OrleQ3qT16i4YS+gCZ35wX7iJeKD x+MO9qlQF60UZOViG0m1Bq5lbjoJH1LGWIgMSHDhr6TJCUFfzqDQOzb4/2/0f90jBkHnZDNugIPc0 zOdxKyyxHwOsX1AH2Q4iHill4U++SnwwQLytWAX2mvAnF2zlxb62+zVUREYvXF7GEMcuVSsB9kgHW fn8Px/YQ==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mZp12-005Iw5-IR; Mon, 11 Oct 2021 06:42:47 +0000 Date: Mon, 11 Oct 2021 07:42:28 +0100 From: Christoph Hellwig To: Cai Huoqing Cc: Michael Cyr , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] scsi: ibmvscsi_tgt: Use dma_alloc_coherent() instead of get_zeroed_page/dma_map_single() Message-ID: References: <20211010160055.488-1-caihuoqing@baidu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211010160055.488-1-caihuoqing@baidu.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 11, 2021 at 12:00:53AM +0800, Cai Huoqing wrote: > Replacing get_zeroed_page/free_page/dma_map_single/dma_unmap_single() > with dma_alloc_coherent/dma_free_coherent() helps to reduce > code size, and simplify the code, and coherent DMA will not > clear the cache every time. This explanation does not make any sense whatsoever. Please explain why it would an show numbers.