Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5833405yba; Thu, 11 Apr 2019 06:45:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqz/9CCRuVFzb1krBo4xJv4/ziSvj/B/zbJJvJZAkDGOApMyzUxV075Y+c9wWnebSXyyzm0T X-Received: by 2002:a63:5ec2:: with SMTP id s185mr47755511pgb.27.1554990322350; Thu, 11 Apr 2019 06:45:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554990322; cv=none; d=google.com; s=arc-20160816; b=x4k9c9Jn/Up2UI4IZBRVb08uyfRhP/V9QUY/tUuH32tiFYTSdDiRfGV5zvRyyOGhC8 ql4I41KpIE0G+esNGsVdALC2xsI/JgYM4cEYUqVO8vAYGwOq+YFmSIsE9SLUSmS2VRgl v0YmiF6G/tMX3T6l+RS121zHMHErfL99MHPVr0Kvq0yKQlRdOfCUuCSwyVPpO8S+GJUo fq0puq3l1ani54mz8GJA5fgkWvt+nPSh/qd+N0OXw3hRw8KEjz2O2Joe3dDC4SmBkCmo 7a6B57M94bXkALOCF74gAiMazMv19bOCNeuDds81Q+rP/rBX2MdtyPe6onvPrloi4Zs0 k6SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=1vkNU8mPzZIQGzx9BpT1C3McoyR3GpazYaF6QbODKwM=; b=X8cYw9p0NAqCdoriRbIvdNMJIMB9GWErvsqb0hVHiR7pHJf/5AhlcZ3SYypRPSPE30 8atkJjNrEJZrwvLfPzoILx5FyBEqklaAYUnlM0a/FdGtB3HGgbficG3yI7Bo+fQXfC7W ckz8QUhxyXerONXdjs15M/HMbDbZEuEMF7eI+9Q+ufQaHjHSzVy6HcMQbjyiirwElOUU oyR15k5i4KfbXAdw9o3GhALgE8rRhOI9PjYO4qgqlD9/i4FtjoYU+SDkYeFIGeKVboLN gobCmsePp3IuQOhdLx8uPjPCSkQVUwqditCWlFq74YNPShmDU5ajFUFoMFQGyVXnTf8h pZgQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f8si22324411pfd.105.2019.04.11.06.45.06; Thu, 11 Apr 2019 06:45:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726649AbfDKNnP (ORCPT + 99 others); Thu, 11 Apr 2019 09:43:15 -0400 Received: from 8bytes.org ([81.169.241.247]:34130 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726264AbfDKNnP (ORCPT ); Thu, 11 Apr 2019 09:43:15 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id A327A42D; Thu, 11 Apr 2019 15:43:13 +0200 (CEST) Date: Thu, 11 Apr 2019 15:43:12 +0200 From: Joerg Roedel To: Shaokun Zhang Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Jinyu Qi Subject: Re: [PATCH] iommu/iova: Separate atomic variables to improve performance Message-ID: <20190411134312.GC4518@8bytes.org> References: <1554280521-18375-1-git-send-email-zhangshaokun@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1554280521-18375-1-git-send-email-zhangshaokun@hisilicon.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 03, 2019 at 04:35:21PM +0800, Shaokun Zhang wrote: > From: Jinyu Qi > > In struct iova_domain, there are three atomic variables, the former two > are about TLB flush counters which use atomic_add operation, anoter is > used to flush timer that use cmpxhg operation. > These variables are in the same cache line, so it will cause some > performance loss under the condition that many cores call queue_iova > function, Let's isolate the two type atomic variables to different > cache line to reduce cache line conflict. > > Cc: Joerg Roedel > Signed-off-by: Jinyu Qi > --- > include/linux/iova.h | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) Applied, thanks.