From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00F37C072B5 for ; Fri, 24 May 2019 20:03:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C834421851 for ; Fri, 24 May 2019 20:03:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391834AbfEXUDm (ORCPT ); Fri, 24 May 2019 16:03:42 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:57465 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391612AbfEXUDl (ORCPT ); Fri, 24 May 2019 16:03:41 -0400 Received: from mail-ot1-f71.google.com ([209.85.210.71]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1hUGPi-0007wv-F1 for linux-kernel@vger.kernel.org; Fri, 24 May 2019 20:03:38 +0000 Received: by mail-ot1-f71.google.com with SMTP id 73so4999384oty.2 for ; Fri, 24 May 2019 13:03:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MdZgSrzvQrNvArhhMwV6uq98L6kGwXydzTCUTc3ed/4=; b=nyzkxWlpmuQTSM7FL8BbV7PvXVB4xXH0cSeWffJLbTSbrj03V2WDPh/ZdXcfNG3yoU L5L3u0ZVoTo5fNICoeiL4xhZ37bRhduTSFxjcIguZHKDIsrpOwBWAkH7Y+Qv8HL/WQIJ CHdznPhvV09D9nadnKXRj32wT69+Jdat8PR3XnLTq72BBEIwifNChCvYE8pw0ZTp9CL1 VeMCAgB+ZtMfOkDKIzcdMSjEooTtGLCQ2FEXopxVBicVlCC/I20dyWOkzSX8ENynQ87o Q/hIfZdtEsxJRFume/r5VOAIAhbe2CQB4Iy8aNbNF8F0TN0/Z01pg9Qvl9Tr1paVa+tf IhiA== X-Gm-Message-State: APjAAAVXvzfQlU1yYLQnFZS1RxCxaUn3Ii9vsEsPn3CgdClOwEj88jSJ 4oPkAEfpvq14fovKp9dRbq6OhhU9MJZ/SyCuOnwnUMlhziM0zBE9di7fLNtcAqFDcpbgaQ4hvE7 Qk+y4KggDeVYroRKISGYaIzQbp085xwifvJe3rdsDQfsg0tDsGyA4VYTvhg== X-Received: by 2002:a05:6830:164d:: with SMTP id h13mr31758686otr.99.1558728217210; Fri, 24 May 2019 13:03:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxoya9uYRsSIEv51UV91v8Z+LxDz8k4gGrzqqMySgCjbel8axNiXlhuqaT0Un+V+0ZUNeHLZgzLuTVB5rKzbzc= X-Received: by 2002:a05:6830:164d:: with SMTP id h13mr31758663otr.99.1558728216929; Fri, 24 May 2019 13:03:36 -0700 (PDT) MIME-Version: 1.0 References: <20190524040633.16854-1-nicoleotsuka@gmail.com> In-Reply-To: <20190524040633.16854-1-nicoleotsuka@gmail.com> From: dann frazier Date: Fri, 24 May 2019 14:03:25 -0600 Message-ID: Subject: Re: [PATCH v3 0/2] Optimize dma_*_from_contiguous calls To: Nicolin Chen Cc: Christoph Hellwig , Robin Murphy , Marek Szyprowski , vdumpa@nvidia.com, linux@armlinux.org.uk, Catalin Marinas , Will Deacon , chris@zankel.net, jcmvbkbc@gmail.com, joro@8bytes.org, dwmw2@infradead.org, tony@atomide.com, akpm@linux-foundation.org, sfr@canb.auug.org.au, treding@nvidia.com, keescook@chromium.org, iamjoonsoo.kim@lge.com, wsa+renesas@sang-engineering.com, linux-arm-kernel , linux-kernel@vger.kernel.org, linux-xtensa@linux-xtensa.org, iommu@lists.linux-foundation.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 23, 2019 at 10:08 PM Nicolin Chen wrote: > > [ Per discussion at v1, we decide to add two new functions and start > replacing callers one by one. For this series, it only touches the > dma-direct part. And instead of merging two PATCHes, I still keep > them separate so that we may easily revert PATCH-2 if anything bad > happens as last time -- PATCH-1 is supposed to be a safe cleanup. ] > > This series of patches try to optimize dma_*_from_contiguous calls: > PATCH-1 abstracts two new functions and applies to dma-direct.c file. > PATCH-2 saves single pages and reduce fragmentations from CMA area. > > Please check their commit messages for detail changelog. > > Nicolin Chen (2): > dma-contiguous: Abstract dma_{alloc,free}_contiguous() > dma-contiguous: Use fallback alloc_pages for single pages > > include/linux/dma-contiguous.h | 11 +++++++ > kernel/dma/contiguous.c | 57 ++++++++++++++++++++++++++++++++++ > kernel/dma/direct.c | 24 +++----------- > 3 files changed, 72 insertions(+), 20 deletions(-) Thanks Nicolin. Tested on a HiSilicon D06 system. Tested-by: dann frazier From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03C85C46470 for ; Fri, 24 May 2019 20:03:43 +0000 (UTC) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BDBC3217D7 for ; Fri, 24 May 2019 20:03:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BDBC3217D7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 5D5991157; Fri, 24 May 2019 20:03:42 +0000 (UTC) Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 3474A1151 for ; Fri, 24 May 2019 20:03:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id 93D0CF4 for ; Fri, 24 May 2019 20:03:40 +0000 (UTC) Received: from mail-ot1-f69.google.com ([209.85.210.69]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1hUGPi-0007wj-8g for iommu@lists.linux-foundation.org; Fri, 24 May 2019 20:03:38 +0000 Received: by mail-ot1-f69.google.com with SMTP id a22so4985317otr.21 for ; Fri, 24 May 2019 13:03:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MdZgSrzvQrNvArhhMwV6uq98L6kGwXydzTCUTc3ed/4=; b=nxhHIl98oqklrA7YfJEoYWIjCR9d8VgaKrPTcmTTvalZVLxqfXJYY2hXUpu1avO9Xb Jblf7/US0lbnde5uhXgfDGljP4+uLr+9x26x86up9DhGpRhdmS/Yg2+mP/oJz8PYMTXM 3n+mYlVphpBT5ZzPH6TS5Mkpn7ZBAJdPrCA/gd5yo6D3BVPod9DkuXPare4xcAne0igr z14Weg8Nf6tGVNggxj0cgfwGK12MZk6KxgiOu18oyMOoMlt/nxkxQhWKutLWQg+1zID2 WZQs4Ty1PKHrHH1UnFZmQLxb2u59pYdK4GF2ZPXvCjb2tqGZbJZ8KocwY28rsrFJTZCT 8qIg== X-Gm-Message-State: APjAAAX762TP6PpYa0ukFZ1ECBPl56qoLjtJBxDb9+Vxf99xsP2DLTx8 q1m+273jZ+anJvR8tAZHZ3woGv5jh1bvml45kcYh24ljBJ1Kp/m8woDue1MTyETy2HspX8lW8OV 3g3Y3sxoA7klQig2Suz6aR5C7ppjcbV89of5u7aUjyXzWuK5dLErYq3h8eEmNPLY= X-Received: by 2002:a05:6830:164d:: with SMTP id h13mr31758682otr.99.1558728217208; Fri, 24 May 2019 13:03:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxoya9uYRsSIEv51UV91v8Z+LxDz8k4gGrzqqMySgCjbel8axNiXlhuqaT0Un+V+0ZUNeHLZgzLuTVB5rKzbzc= X-Received: by 2002:a05:6830:164d:: with SMTP id h13mr31758663otr.99.1558728216929; Fri, 24 May 2019 13:03:36 -0700 (PDT) MIME-Version: 1.0 References: <20190524040633.16854-1-nicoleotsuka@gmail.com> In-Reply-To: <20190524040633.16854-1-nicoleotsuka@gmail.com> From: dann frazier Date: Fri, 24 May 2019 14:03:25 -0600 Message-ID: Subject: Re: [PATCH v3 0/2] Optimize dma_*_from_contiguous calls To: Nicolin Chen Cc: tony@atomide.com, Catalin Marinas , Will Deacon , jcmvbkbc@gmail.com, Christoph Hellwig , sfr@canb.auug.org.au, linux@armlinux.org.uk, treding@nvidia.com, linux-xtensa@linux-xtensa.org, keescook@chromium.org, akpm@linux-foundation.org, linux-arm-kernel , chris@zankel.net, wsa+renesas@sang-engineering.com, Robin Murphy , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, iamjoonsoo.kim@lge.com, dwmw2@infradead.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: iommu-bounces@lists.linux-foundation.org Errors-To: iommu-bounces@lists.linux-foundation.org On Thu, May 23, 2019 at 10:08 PM Nicolin Chen wrote: > > [ Per discussion at v1, we decide to add two new functions and start > replacing callers one by one. For this series, it only touches the > dma-direct part. And instead of merging two PATCHes, I still keep > them separate so that we may easily revert PATCH-2 if anything bad > happens as last time -- PATCH-1 is supposed to be a safe cleanup. ] > > This series of patches try to optimize dma_*_from_contiguous calls: > PATCH-1 abstracts two new functions and applies to dma-direct.c file. > PATCH-2 saves single pages and reduce fragmentations from CMA area. > > Please check their commit messages for detail changelog. > > Nicolin Chen (2): > dma-contiguous: Abstract dma_{alloc,free}_contiguous() > dma-contiguous: Use fallback alloc_pages for single pages > > include/linux/dma-contiguous.h | 11 +++++++ > kernel/dma/contiguous.c | 57 ++++++++++++++++++++++++++++++++++ > kernel/dma/direct.c | 24 +++----------- > 3 files changed, 72 insertions(+), 20 deletions(-) Thanks Nicolin. Tested on a HiSilicon D06 system. Tested-by: dann frazier _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, T_DKIMWL_WL_HIGH,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE838C072B5 for ; Fri, 24 May 2019 20:03:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 81BDF217D7 for ; Fri, 24 May 2019 20:03:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="I36/a5yo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 81BDF217D7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4Z6vwaPghqu3/Hk6Z0yD6waePTn6PhNUpqqzIEWjm40=; b=I36/a5you0l0lZ rZuRvBv3LRkM97AAdFsSXD108zMxpur6f4miCVw0jQPfDqdnW8EGuEZR+yIACTym/TgqobHPlboMj zJJYLCQmkEY8KBzPxOLdVWsVCLenFB6nV9OJwICAKhGZDSmrD6YJXCgZGtYStzpx9404k87wrRI/9 5Yroue3sSwZoI8qe5NyN2DnRBjrXPWiTtk7sj6tCkM5QncL4ZwQeWJtcMuk5r0Ah4qUAfgUAocMRG PBJVOGzs7Xivz4cD1I5QkFJKAzuyZ1fvOpsc6e98gMiFOtrURZGQv0G/CquEHpOSbkX59CV+ew1+0 1xLU9yazflD7X4O+cZFA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hUGPo-0006db-GH; Fri, 24 May 2019 20:03:44 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hUGPl-0006ct-93 for linux-arm-kernel@lists.infradead.org; Fri, 24 May 2019 20:03:42 +0000 Received: from mail-ot1-f71.google.com ([209.85.210.71]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1hUGPi-0007ws-EC for linux-arm-kernel@lists.infradead.org; Fri, 24 May 2019 20:03:38 +0000 Received: by mail-ot1-f71.google.com with SMTP id z1so4988516oth.8 for ; Fri, 24 May 2019 13:03:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MdZgSrzvQrNvArhhMwV6uq98L6kGwXydzTCUTc3ed/4=; b=VAc5dvof9rMm9m8ENTnY3lUsM0EFewI+QpEVDwq3V4ij8wvmq40PaU4hW5MNRzmH7v fpvTw99Dt5wWJ7IUkFgwEmZH/826He5Z8bYTesPg/onpRFxeC+yonaxl2vRpgrF2Kl39 PXAlTTHAQyzUjncIhTAJndk+UDYE4XG4kGMGllc4Pz1UrvTTgLBdQ+xtb+FlIMJEjqTn ig8UyFj+7J9w6koV6wew3GVlfqEqN36STtc2bZxR/VvRv0ZMCa6CmDN8D58O/N+l1Q3J g/EYsrWfa9Q0Wabv5JAd86moS44jU1NmBO/FXKGCBrd20wFEriuucIBg+CkltpoksmMx HMNg== X-Gm-Message-State: APjAAAU6e1EosRM8CnFBf3B796I58MYUpHGv2uYKUnjXYcizv3082Au3 sjYKYRY03hKLuGPNH8Toiz4lea84sIoPYw3A77N1N+9fORUt57OlwEBHYJ/n759jlCJAOQD8rNf HteTAgh1U/J6ZentMB1tZR+Grvfcm07c2Wd0LhBHgj67kFnZjSOmxMFWJrayreu7Mm6me X-Received: by 2002:a05:6830:164d:: with SMTP id h13mr31758683otr.99.1558728217208; Fri, 24 May 2019 13:03:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxoya9uYRsSIEv51UV91v8Z+LxDz8k4gGrzqqMySgCjbel8axNiXlhuqaT0Un+V+0ZUNeHLZgzLuTVB5rKzbzc= X-Received: by 2002:a05:6830:164d:: with SMTP id h13mr31758663otr.99.1558728216929; Fri, 24 May 2019 13:03:36 -0700 (PDT) MIME-Version: 1.0 References: <20190524040633.16854-1-nicoleotsuka@gmail.com> In-Reply-To: <20190524040633.16854-1-nicoleotsuka@gmail.com> From: dann frazier Date: Fri, 24 May 2019 14:03:25 -0600 Message-ID: Subject: Re: [PATCH v3 0/2] Optimize dma_*_from_contiguous calls To: Nicolin Chen X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190524_130341_458671_B9999428 X-CRM114-Status: GOOD ( 13.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tony@atomide.com, Catalin Marinas , Will Deacon , jcmvbkbc@gmail.com, Christoph Hellwig , Marek Szyprowski , sfr@canb.auug.org.au, joro@8bytes.org, linux@armlinux.org.uk, treding@nvidia.com, linux-xtensa@linux-xtensa.org, keescook@chromium.org, akpm@linux-foundation.org, linux-arm-kernel , chris@zankel.net, wsa+renesas@sang-engineering.com, Robin Murphy , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, iamjoonsoo.kim@lge.com, dwmw2@infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, May 23, 2019 at 10:08 PM Nicolin Chen wrote: > > [ Per discussion at v1, we decide to add two new functions and start > replacing callers one by one. For this series, it only touches the > dma-direct part. And instead of merging two PATCHes, I still keep > them separate so that we may easily revert PATCH-2 if anything bad > happens as last time -- PATCH-1 is supposed to be a safe cleanup. ] > > This series of patches try to optimize dma_*_from_contiguous calls: > PATCH-1 abstracts two new functions and applies to dma-direct.c file. > PATCH-2 saves single pages and reduce fragmentations from CMA area. > > Please check their commit messages for detail changelog. > > Nicolin Chen (2): > dma-contiguous: Abstract dma_{alloc,free}_contiguous() > dma-contiguous: Use fallback alloc_pages for single pages > > include/linux/dma-contiguous.h | 11 +++++++ > kernel/dma/contiguous.c | 57 ++++++++++++++++++++++++++++++++++ > kernel/dma/direct.c | 24 +++----------- > 3 files changed, 72 insertions(+), 20 deletions(-) Thanks Nicolin. Tested on a HiSilicon D06 system. Tested-by: dann frazier _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel