From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Date: Tue, 24 Mar 2015 01:44:53 +0000 Subject: Re: Generic IOMMU pooled allocator Message-Id: <20150323.214453.255192641139042325.davem@davemloft.net> List-Id: References: <20150323165406.GG14061@oracle.com> <20150323.150508.149509757161802782.davem@davemloft.net> <1427149265.4770.238.camel@kernel.crashing.org> In-Reply-To: <1427149265.4770.238.camel@kernel.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: benh@kernel.crashing.org Cc: aik@au1.ibm.com, aik@ozlabs.ru, sowmini.varadhan@oracle.com, anton@au1.ibm.com, paulus@samba.org, sparclinux@vger.kernel.org, linuxppc-dev@lists.ozlabs.org From: Benjamin Herrenschmidt Date: Tue, 24 Mar 2015 09:21:05 +1100 > Dave, what's your feeling there ? Does anybody around still have > some HW that we can test with ? I don't see what the actual problem is. Even if you use multiple pools, which we should for scalability on sun4u too, just do the flush when allocation in _any_ pool wraps around. That's still better than not doing the optimization at all. That is always going to be correct, and you can use a separate spinlock to make sure only one thread of control does the full IOMMU flush at a time. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2001:4f8:3:36:211:85ff:fe63:a549]) by lists.ozlabs.org (Postfix) with ESMTP id 85B0C1A0279 for ; Tue, 24 Mar 2015 12:44:57 +1100 (AEDT) Date: Mon, 23 Mar 2015 21:44:53 -0400 (EDT) Message-Id: <20150323.214453.255192641139042325.davem@davemloft.net> To: benh@kernel.crashing.org Subject: Re: Generic IOMMU pooled allocator From: David Miller In-Reply-To: <1427149265.4770.238.camel@kernel.crashing.org> References: <20150323165406.GG14061@oracle.com> <20150323.150508.149509757161802782.davem@davemloft.net> <1427149265.4770.238.camel@kernel.crashing.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Cc: aik@au1.ibm.com, aik@ozlabs.ru, sowmini.varadhan@oracle.com, anton@au1.ibm.com, paulus@samba.org, sparclinux@vger.kernel.org, linuxppc-dev@lists.ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Benjamin Herrenschmidt Date: Tue, 24 Mar 2015 09:21:05 +1100 > Dave, what's your feeling there ? Does anybody around still have > some HW that we can test with ? I don't see what the actual problem is. Even if you use multiple pools, which we should for scalability on sun4u too, just do the flush when allocation in _any_ pool wraps around. That's still better than not doing the optimization at all. That is always going to be correct, and you can use a separate spinlock to make sure only one thread of control does the full IOMMU flush at a time.