From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762050AbbA3M2S (ORCPT ); Fri, 30 Jan 2015 07:28:18 -0500 Received: from 8bytes.org ([81.169.241.247]:57679 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753435AbbA3M2P (ORCPT ); Fri, 30 Jan 2015 07:28:15 -0500 Date: Fri, 30 Jan 2015 13:28:14 +0100 From: Joerg Roedel To: Will Deacon Cc: "iommu@lists.linux-foundation.org" , Kukjin Kim , David Woodhouse , Heiko Stuebner , Hiroshi Doyu , Thierry Reding , Alex Williamson , Arnd Bergmann , "linux-kernel@vger.kernel.org" , Robin Murphy , Laurent Pinchart , "jroedel@suse.de" Subject: Re: [PATCH 3/5] iommu: Limit iommu_attach/detach_device to devices with their own group Message-ID: <20150130122814.GC3702@8bytes.org> References: <1422317339-22620-1-git-send-email-joro@8bytes.org> <1422317339-22620-4-git-send-email-joro@8bytes.org> <20150128143523.GR1569@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150128143523.GR1569@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 28, 2015 at 02:35:24PM +0000, Will Deacon wrote: > On Tue, Jan 27, 2015 at 12:08:57AM +0000, Joerg Roedel wrote: > > @@ -51,6 +51,7 @@ struct iommu_group { > > void (*iommu_data_release)(void *iommu_data); > > char *name; > > int id; > > + unsigned dev_cnt; > > Is this actually used on a fast path, or can we just inspect the list of > devices on the group instead? Not really a fast path, but we have to hold the group mutex while traversing the list, which could hurt performance somewhere else. Are these 4 bytes a problem? Joerg