Messages in this thread | | | From | "Kalra, Ashish" <> | Subject | Re: [PATCH v6] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests. | Date | Tue, 24 Nov 2020 09:43:37 +0000 |
| |
> 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&data=04%7C01%7CAshish.Kalra%40amd.com%7C91b611b21d3049d70ca908d8905cbc37%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637418075284000564%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=JvnUfskyd9xdsal4oYkSYW5ouL2b4cs%2Fo2oYi9KrkFo%3D&reserved=0
| |