iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: "Kalra, Ashish" <Ashish.Kalra@amd.com>
To: Borislav Petkov <bp@alien8.de>
Cc: "Lendacky, Thomas" <Thomas.Lendacky@amd.com>,
	"Grimm, Jon" <Jon.Grimm@amd.com>,
	"Singh, Brijesh" <brijesh.singh@amd.com>,
	"dave.hansen@linux-intel.com" <dave.hansen@linux-intel.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"luto@kernel.org" <luto@kernel.org>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"rientjes@google.com" <rientjes@google.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"hch@lst.de" <hch@lst.de>
Subject: Re: [PATCH v6] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.
Date: Tue, 24 Nov 2020 09:43:37 +0000	[thread overview]
Message-ID: <69A79870-3822-44AA-8A5D-DC329828CF64@amd.com> (raw)
In-Reply-To: <20201124093837.GD4009@zn.tnic>



> On Nov 24, 2020, at 3:38 AM, Borislav Petkov <bp@alien8.de> wrote:
> 
> On Tue, Nov 24, 2020 at 09:25:06AM +0000, Kalra, Ashish wrote:
>> But what will be the criteria to figure out this percentage?
>> 
>> As I mentioned earlier, this can be made as complicated as possible by
>> adding all kind of heuristics but without any predictable performance
>> gain.
>> 
>> Or it can be kept simple by using a static percentage value.
> 
> Yes, static percentage number based on the guest memory. X% of the guest
> memory is used for SWIOTLB.
> 
> Since you use sev_active(), it means the size computation is done in the
> guest so that SWIOTLB size is per-guest. Yes?

Yes

> 
> If so, you can simply take, say, 5% of the guest memory's size and use
> that for SWIOTLB buffers. Or 6 or X or whatever.
> 
> Makes sense?

Sure it does.

Thanks,
Ashish

> 
> -- 
> Regards/Gruss,
>    Boris.
> 
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpeople.kernel.org%2Ftglx%2Fnotes-about-netiquette&amp;data=04%7C01%7CAshish.Kalra%40amd.com%7C91b611b21d3049d70ca908d8905cbc37%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637418075284000564%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=JvnUfskyd9xdsal4oYkSYW5ouL2b4cs%2Fo2oYi9KrkFo%3D&amp;reserved=0
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  reply	other threads:[~2020-11-24  9:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 21:42 [PATCH v6] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests Ashish Kalra
2020-11-23 17:06 ` Borislav Petkov
2020-11-23 17:56   ` Konrad Rzeszutek Wilk
2020-11-23 18:02     ` Borislav Petkov
2020-11-23 18:43       ` Konrad Rzeszutek Wilk
2020-11-24  9:00         ` Borislav Petkov
2020-11-23 22:56     ` Ashish Kalra
2020-11-24  9:04       ` Borislav Petkov
2020-11-24  9:25         ` Kalra, Ashish
2020-11-24  9:38           ` Borislav Petkov
2020-11-24  9:43             ` Kalra, Ashish [this message]
2020-11-24 23:46       ` Ashish Kalra
2020-12-01 20:42         ` Konrad Rzeszutek Wilk

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=69A79870-3822-44AA-8A5D-DC329828CF64@amd.com \
    --to=ashish.kalra@amd.com \
    --cc=Jon.Grimm@amd.com \
    --cc=Thomas.Lendacky@amd.com \
    --cc=bp@alien8.de \
    --cc=brijesh.singh@amd.com \
    --cc=dave.hansen@linux-intel.com \
    --cc=hch@lst.de \
    --cc=hpa@zytor.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rientjes@google.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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;
as well as URLs for NNTP newsgroup(s).