From: Adam Morrison <mad-FrESSTt7Abv7r6psnUbsSmZHpeb/A1Y/@public.gmane.org>
To: Shaohua Li <shli-b10kYP2dOMg@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
Kernel-team-b10kYP2dOMg@public.gmane.org
Subject: Re: [PATCH V2 0/4]IOMMU: avoid lock contention in iova allocation
Date: Mon, 11 Jan 2016 00:56:12 +0200 [thread overview]
Message-ID: <20160110225610.GA16778@cs.technion.ac.il> (raw)
In-Reply-To: <cover.1452297604.git.shli-b10kYP2dOMg@public.gmane.org>
Hi,
> iova alloc/free causes big lock contention, which could be easily demonstrated
> with iperf workload. Previously I posted a patchset:
> http://lists.linuxfoundation.org/pipermail/iommu/2015-November/014984.html
>
> the concern is it's not generic. This is another try for the issue. This
> version implements a per-cpu iova cache for small size DMA allocation (<= 64k),
> which should be generic enough and so we can do batch allocation. iova free
> could be easily batched too. With batch alloc/free, iova lock contention
> disappears. Performance result with this patchset is nearly the same as the
> previous one in the same test.
>
> After this patchset, async_umap_flush_lock becomes the hotest lock in
> intel-iommu, but not very bad. That will be something we need work on in the
> future.
There can still be significant spinlock contention with this patchset.
For example, here's the throughput obtained when accessing 16 memcached
instances running on a 16-core Sandy Bridge with an Intel XL710 NIC.
The client machine has iommu=off and runs memslap with the default
config (64-byte keys, 1024-byte values, and 10%/90% SET/GET ops):
stock (4.4.0-rc5) iommu=off:
1,088,996 memcached transactions/sec (=100%, median of 10 runs).
this patch, iommu=on:
313,161 memcached transactions/sec (=29%).
perf: 21.87% 0.57% memcached [kernel.kallsyms] [k] _raw_spin_lock_irqsave
|
---_raw_spin_lock_irqsave
|
|--67.84%-- intel_unmap (async_umap_flush_lock)
|--17.54%-- alloc_iova
|--12.85%-- free_iova_array
For reference, the patchset I posted two weeks ago gets almost the same
throughput as with iommu=off:
http://lists.linuxfoundation.org/pipermail/iommu/2015-December/015271.html:
1,067,586 memcached transactions/sec (=98%).
perf: 0.75% 0.75% memcached [kernel.kallsyms] [k] _raw_spin_lock_irqsave]
next prev parent reply other threads:[~2016-01-10 22:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-09 0:44 [PATCH V2 0/4]IOMMU: avoid lock contention in iova allocation Shaohua Li
[not found] ` <cover.1452297604.git.shli-b10kYP2dOMg@public.gmane.org>
2016-01-09 0:44 ` [PATCH V2 1/4] IOMMU: add a percpu cache for " Shaohua Li
2016-01-09 0:44 ` [PATCH V2 2/4] iommu: free_iova doesn't need lock twice Shaohua Li
2016-01-09 0:44 ` [PATCH V2 3/4] intel-iommu: remove find_iova in unmap path Shaohua Li
2016-01-09 0:44 ` [PATCH V2 4/4] intel-iommu: do batch iova free Shaohua Li
2016-01-10 22:56 ` Adam Morrison [this message]
[not found] ` <20160110225610.GA16778-FrESSTt7Abv7r6psnUbsSmZHpeb/A1Y/@public.gmane.org>
2016-01-11 3:37 ` [PATCH V2 0/4]IOMMU: avoid lock contention in iova allocation Shaohua Li
[not found] ` <20160111033749.GA1811285-tb7CFzD8y5b7E6g3fPdp/g2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2016-01-20 12:21 ` Joerg Roedel
[not found] ` <20160120122103.GE18805-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2016-01-20 18:10 ` Shaohua Li
[not found] ` <20160120180956.GA230160-tb7CFzD8y5b7E6g3fPdp/g2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2016-01-20 20:47 ` Adam Morrison
[not found] ` <CAHMfzJmAUWT8X4492_84smUgQMW9pW1yNfOxC6e7ur9TitA2cA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-20 21:14 ` Shaohua Li
[not found] ` <20160120211421.GA684235-tb7CFzD8y5b7E6g3fPdp/g2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2016-01-21 23:14 ` Adam Morrison
[not found] ` <20160121231326.GA16905-FrESSTt7Abv7r6psnUbsSmZHpeb/A1Y/@public.gmane.org>
2016-01-22 0:18 ` Shaohua Li
[not found] ` <20160122001801.GA4114061-tb7CFzD8y5b7E6g3fPdp/g2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2016-01-22 11:35 ` Adam Morrison
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=20160110225610.GA16778@cs.technion.ac.il \
--to=mad-fresstt7abv7r6psnubssmzhpeb/a1y/@public.gmane.org \
--cc=Kernel-team-b10kYP2dOMg@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=shli-b10kYP2dOMg@public.gmane.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.