From: John Garry <john.garry@huawei.com>
To: Feng Tang <feng.tang@intel.com>
Cc: Robin Murphy <robin.murphy@arm.com>,
Joerg Roedel <joro@8bytes.org>, "Will Deacon" <will@kernel.org>,
<iommu@lists.linux-foundation.org>, <iommu@lists.linux.dev>,
Andrew Morton <akpm@linux-foundation.org>,
"Christoph Lameter" <cl@linux.com>,
Vlastimil Babka <vbabka@suse.cz>, <linux-mm@kvack.org>,
<linux-kernel@vger.kernel.org>,
Paul Menzel <pmenzel@molgen.mpg.de>
Subject: Re: [PATCH] iommu/iova: change IOVA_MAG_SIZE to 127 to save memory
Date: Fri, 1 Jul 2022 12:33:17 +0100 [thread overview]
Message-ID: <51af869a-83d4-631a-2d91-edb8b066bf4d@huawei.com> (raw)
In-Reply-To: <20220701035622.GB14806@shbuild999.sh.intel.com>
On 01/07/2022 04:56, Feng Tang wrote:
>>> inclination.
>>>
>> ok, what you are saying sounds reasonable. I just remember that when we
>> analyzed the longterm aging issue that we concluded that the FQ size and its
>> relation to the magazine size was a factor and this change makes me a little
>> worried about new issues. Better the devil you know and all that...
>>
>> Anyway, if I get some time I might do some testing to see if this change has
>> any influence.
>>
>> Another thought is if we need even store the size in the iova_magazine? mags
>> in the depot are always full. As such, we only need worry about mags loaded
>> in the cpu rcache and their sizes, so maybe we could have something like
>> this:
>>
>> struct iova_magazine {
>> - unsigned long size;
>> unsigned long pfns[IOVA_MAG_SIZE];
>> };
>>
>> @@ -631,6 +630,8 @@ struct iova_cpu_rcache {
>> spinlock_t lock;
>> struct iova_magazine *loaded;
>> struct iova_magazine *prev;
>> + int loaded_size;
>> + int prev_size;
>> };
>>
>> I haven't tried to implement it though..
> I have very few knowledge of iova, so you can chose what's the better
> solution. I just wanted to raise the problem and will be happy to see
> it solved:)
I quickly tested your patch for performance and saw no noticeable
difference, which is no surprise.
But I'll defer to Robin if he thinks that your patch is a better
solution - I would guess that he does. For me personally I would prefer
that this value was not changed, as I mentioned before.
thanks,
John
next prev parent reply other threads:[~2022-07-01 11:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-30 7:33 Feng Tang
2022-06-30 9:02 ` Robin Murphy
2022-06-30 9:33 ` Feng Tang
2022-06-30 9:37 ` John Garry
2022-06-30 10:06 ` Robin Murphy
2022-06-30 10:52 ` John Garry
2022-07-01 3:56 ` Feng Tang
2022-07-01 11:33 ` John Garry [this message]
2022-07-01 12:01 ` Robin Murphy
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=51af869a-83d4-631a-2d91-edb8b066bf4d@huawei.com \
--to=john.garry@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=feng.tang@intel.com \
--cc=iommu@lists.linux-foundation.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pmenzel@molgen.mpg.de \
--cc=robin.murphy@arm.com \
--cc=vbabka@suse.cz \
--cc=will@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox