Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5331767pxv; Wed, 28 Jul 2021 08:20:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvtPylQKUgtHjLNcAZc2HgIqYrkesyox7Jkr5GaUXpFkRnAzd0Ofcc9SIr++cNDgY3rNSF X-Received: by 2002:a05:6402:26ca:: with SMTP id x10mr366837edd.319.1627485621552; Wed, 28 Jul 2021 08:20:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627485621; cv=none; d=google.com; s=arc-20160816; b=luso9m/Om9Uyhv1dF8VtF4WNfDlT2rBDqqGoc6FR9vcCt8UW68+qwaTI5/QOylqFnH fNQXBchbZz/xL8ZTZshqC1vGMB1hETpcphcqhEBTvBj56k/lfqNCNF8q3xFQc9H5snrP kjwHqXAk71t97c8o8hsCva4WIg3M50ftQgcHKEHlya1MwDbb/uTUdKTzm5arDM+zNoky xNHtNCFjevdW5tUWrFYhZE8ZEurQ1QXW3qEIzumNx7wqTV1I34blMwYwc5QwX2JtnX6x Z4+RZgikamvLsunj/Gcg8Grd6vhJAdEUHn6tJgeGxJUGuctdcQyRnoX+GuM9G4d/EnPH AS1Q== 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=G74hAD1INJz4al2p5kUqrIQ36rIkhCEJh1SOa5TxS9s=; b=oKFpqG+/moVaDxCesQdYvoLKm0djeQLnUqyskQFdBTV7+pUnwgJGyDz6XRSP8Q8geg Pb4VH+ulKpD7M7nJcNia+JdkYM3FBbChekq1VoI4gSzV0Zq84e0o4pxUVxFr8gXj/v+R H5UTu9fOU0LZGIaP2hvpuU1BdTpDTkld8bF2P2KhDhqmyINpWHdSj4jp4hW5fOUJ3/la mTQlMw1aBU7aCZeP3zGagY7WVzI3PZ9XNQosWW8z6ddn2JfGKj8fIJVdf4wZv0mFvcT/ Dcm/jLp/3AAP2CjlqahJghoBiIqz5uhmRvV7kKwFe8t5VXzwptlci8MqrOZR+tX/cBI/ rlWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=U8bGFJR+; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e23si89757ejj.438.2021.07.28.08.19.57; Wed, 28 Jul 2021 08:20:21 -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=@redhat.com header.s=mimecast20190719 header.b=U8bGFJR+; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236711AbhG1PRf (ORCPT + 99 others); Wed, 28 Jul 2021 11:17:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:57695 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235559AbhG1PRd (ORCPT ); Wed, 28 Jul 2021 11:17:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627485451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=G74hAD1INJz4al2p5kUqrIQ36rIkhCEJh1SOa5TxS9s=; b=U8bGFJR+tZUb14klmRFoK9YTokaS9eFpDhiYG+BH3mIGp/+QZyYCMJx9fOfgzL7g7xQCbA Yq8snewYS1ToMvEU15clIqTUlCj0cmYYwied6I8nVObSh2gUidrrfCmrwnfaqVwayBIDTo YWWRmH14g3zeSNcwoqmGYDjJg0WCoEg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-522-UDtteHy1NGmvPeuayJGZwg-1; Wed, 28 Jul 2021 11:17:29 -0400 X-MC-Unique: UDtteHy1NGmvPeuayJGZwg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8B449801AC0; Wed, 28 Jul 2021 15:17:28 +0000 (UTC) Received: from T590 (ovpn-12-35.pek2.redhat.com [10.72.12.35]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 27C7A1971B; Wed, 28 Jul 2021 15:17:19 +0000 (UTC) Date: Wed, 28 Jul 2021 23:17:20 +0800 From: Ming Lei To: John Garry Cc: Robin Murphy , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, iommu@lists.linux-foundation.org, Will Deacon , linux-arm-kernel@lists.infradead.org Subject: Re: [bug report] iommu_dma_unmap_sg() is very slow then running IO from remote numa node Message-ID: References: <9c929985-4fcb-e65d-0265-34c820b770ea@huawei.com> <0adbe03b-ce26-e4d3-3425-d967bc436ef5@arm.com> <6ceab844-465f-3bf3-1809-5df1f1dbbc5c@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 28, 2021 at 11:38:18AM +0100, John Garry wrote: > On 28/07/2021 02:32, Ming Lei wrote: > > On Mon, Jul 26, 2021 at 3:51 PM John Garry wrote: > > > On 23/07/2021 11:21, Ming Lei wrote: > > > > > Thanks, I was also going to suggest the latter, since it's what > > > > > arm_smmu_cmdq_issue_cmdlist() does with IRQs masked that should be most > > > > > indicative of where the slowness most likely stems from. > > > > The improvement from 'iommu.strict=0' is very small: > > > > > > > Have you tried turning off the IOMMU to ensure that this is really just > > > an IOMMU problem? > > > > > > You can try setting CONFIG_ARM_SMMU_V3=n in the defconfig or passing > > > cmdline param iommu.passthrough=1 to bypass the the SMMU (equivalent to > > > disabling for kernel drivers). > > Bypassing SMMU via iommu.passthrough=1 basically doesn't make a difference > > on this issue. > > A ~90% throughput drop still seems to me to be too high to be a software > issue. More so since I don't see similar on my system. And that throughput > drop does not lead to a total CPU usage drop, from the fio log. > > Do you know if anyone has run memory benchmark tests on this board to find > out NUMA effect? I think lmbench or stream could be used for this. https://lore.kernel.org/lkml/YOhbc5C47IzC893B@T590/ -- Ming