From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH v3 2/2] iommu: Remove cpu-local spinlock Date: Wed, 15 Jun 2016 14:22:23 +0200 Message-ID: <20160615122223.GI26566@8bytes.org> References: <1464776603-11998-1-git-send-email-chris@chris-wilson.co.uk> <1464779409-26711-1-git-send-email-chris@chris-wilson.co.uk> <1464779409-26711-2-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1464779409-26711-2-git-send-email-chris-Y6uKTt2uX1cEflXRtASbqLVCufUGDwFn@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Chris Wilson Cc: intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, Joonas Lahtinen , iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: iommu@lists.linux-foundation.org On Wed, Jun 01, 2016 at 12:10:09PM +0100, Chris Wilson wrote: > By avoiding cross-CPU usage of the per-cpu iova cache, we can forgo > having a spinlock inside the per-cpu struct. The only place where we > actually may touch another CPU's data is when performing a cache flush > after running out of memory. Here, we can instead schedule a task to run > on the other CPU to do the flush before trying again. The big benefit of the spinlock is that the rcache can be flushed from a different cpu without the need to send IPIs to everyone. Joerg From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753438AbcFOMYb (ORCPT ); Wed, 15 Jun 2016 08:24:31 -0400 Received: from 8bytes.org ([81.169.241.247]:35321 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750976AbcFOMY3 (ORCPT ); Wed, 15 Jun 2016 08:24:29 -0400 Date: Wed, 15 Jun 2016 14:22:23 +0200 From: Joerg Roedel To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org, Joonas Lahtinen , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/2] iommu: Remove cpu-local spinlock Message-ID: <20160615122223.GI26566@8bytes.org> References: <1464776603-11998-1-git-send-email-chris@chris-wilson.co.uk> <1464779409-26711-1-git-send-email-chris@chris-wilson.co.uk> <1464779409-26711-2-git-send-email-chris@chris-wilson.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1464779409-26711-2-git-send-email-chris@chris-wilson.co.uk> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 01, 2016 at 12:10:09PM +0100, Chris Wilson wrote: > By avoiding cross-CPU usage of the per-cpu iova cache, we can forgo > having a spinlock inside the per-cpu struct. The only place where we > actually may touch another CPU's data is when performing a cache flush > after running out of memory. Here, we can instead schedule a task to run > on the other CPU to do the flush before trying again. The big benefit of the spinlock is that the rcache can be flushed from a different cpu without the need to send IPIs to everyone. Joerg