From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Cc: aik@au1.ibm.com, anton@au1.ibm.com, paulus@samba.org,
sparclinux@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
davem@davemloft.net
Subject: Re: [PATCHv9 RFC 1/3] Break up monolithic iommu table/lock into finer graularity pools and lock
Date: Sun, 05 Apr 2015 22:26:01 +1000 [thread overview]
Message-ID: <1428236761.20500.315.camel@kernel.crashing.org> (raw)
In-Reply-To: <a259c5bbc3d98dbaedc73a88250a5e7c937ec5f9.1428181553.git.sowmini.varadhan@oracle.com>
On Sun, 2015-04-05 at 07:49 -0400, Sowmini Varadhan wrote:
> + if (likely(pass == 0)) {
> + /* First failure, rescan from the beginning.
> */
> + pool->hint = pool->start;
> + set_flush(iommu);
> + pass++;
> + goto again;
> + } else if (!largealloc && pass <= iommu->nr_pools) {
> + spin_unlock(&(pool->lock));
> + pool_nr = (pool_nr + 1) & (iommu->nr_pools -
> 1);
> + pool = &(iommu->pools[pool_nr]);
> + spin_lock(&(pool->lock));
> + pool->hint = pool->start;
> + set_flush(iommu);
> + pass++;
> + goto again;
So you decided to keep the logic here that updates the hint instead of
just getting rid of need_flush alltogether ?
Out of curiosity, what's the rationale ? Did you find a reason why
resetting the hint in those two cases (rather than just setting "start"
appropriately) is actually useful ?
Cheers,
Ben.
WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Cc: aik@au1.ibm.com, anton@au1.ibm.com, paulus@samba.org,
sparclinux@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
davem@davemloft.net
Subject: Re: [PATCHv9 RFC 1/3] Break up monolithic iommu table/lock into finer graularity pools and lock
Date: Sun, 05 Apr 2015 12:26:01 +0000 [thread overview]
Message-ID: <1428236761.20500.315.camel@kernel.crashing.org> (raw)
In-Reply-To: <a259c5bbc3d98dbaedc73a88250a5e7c937ec5f9.1428181553.git.sowmini.varadhan@oracle.com>
On Sun, 2015-04-05 at 07:49 -0400, Sowmini Varadhan wrote:
> + if (likely(pass = 0)) {
> + /* First failure, rescan from the beginning.
> */
> + pool->hint = pool->start;
> + set_flush(iommu);
> + pass++;
> + goto again;
> + } else if (!largealloc && pass <= iommu->nr_pools) {
> + spin_unlock(&(pool->lock));
> + pool_nr = (pool_nr + 1) & (iommu->nr_pools -
> 1);
> + pool = &(iommu->pools[pool_nr]);
> + spin_lock(&(pool->lock));
> + pool->hint = pool->start;
> + set_flush(iommu);
> + pass++;
> + goto again;
So you decided to keep the logic here that updates the hint instead of
just getting rid of need_flush alltogether ?
Out of curiosity, what's the rationale ? Did you find a reason why
resetting the hint in those two cases (rather than just setting "start"
appropriately) is actually useful ?
Cheers,
Ben.
next prev parent reply other threads:[~2015-04-05 12:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-05 11:49 [PATCH v9 RFC 0/3] Generic IOMMU pooled allocator Sowmini Varadhan
2015-04-08 13:25 ` [PATCH v9 " Sowmini Varadhan
2015-04-05 11:49 ` [PATCHv9 RFC 1/3] Break up monolithic iommu table/lock into finer graularity pools and lock Sowmini Varadhan
2015-04-05 11:49 ` Sowmini Varadhan
2015-04-05 12:26 ` Benjamin Herrenschmidt [this message]
2015-04-05 12:26 ` Benjamin Herrenschmidt
2015-04-05 19:17 ` Sowmini Varadhan
2015-04-05 19:17 ` Sowmini Varadhan
2015-04-08 8:30 ` Benjamin Herrenschmidt
2015-04-08 8:30 ` Benjamin Herrenschmidt
2015-04-08 10:12 ` Sowmini Varadhan
2015-04-08 10:12 ` Sowmini Varadhan
2015-04-05 11:49 ` [PATCH v9 RFC 2/3] sparc: Make sparc64 use scalable lib/iommu-common.c functions Sowmini Varadhan
2015-04-05 11:49 ` Sowmini Varadhan
2015-04-05 11:49 ` [PATCH v9 RFC 3/3] sparc: Make LDC use common iommu poll management functions Sowmini Varadhan
2015-04-08 13:25 ` [PATCH v9 " Sowmini Varadhan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1428236761.20500.315.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=aik@au1.ibm.com \
--cc=anton@au1.ibm.com \
--cc=davem@davemloft.net \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
--cc=sowmini.varadhan@oracle.com \
--cc=sparclinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.