public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tianyu Lan <ltykernel@gmail.com>
To: Christoph Hellwig <hch@lst.de>
Cc: kys@microsoft.com, haiyangz@microsoft.com,
	sthemmin@microsoft.com, wei.liu@kernel.org, decui@microsoft.com,
	tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
	dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com,
	hch@infradead.org, m.szyprowski@samsung.com,
	robin.murphy@arm.com, michael.h.kelley@microsoft.com,
	Tianyu Lan <Tianyu.Lan@microsoft.com>,
	iommu@lists.linux-foundation.org, linux-hyperv@vger.kernel.org,
	linux-kernel@vger.kernel.org, vkuznets@redhat.com,
	brijesh.singh@amd.com, konrad.wilk@oracle.com,
	parri.andrea@gmail.com, thomas.lendacky@amd.com
Subject: Re: [PATCH V2 1/2] Swiotlb: Add swiotlb_alloc_from_low_pages switch
Date: Mon, 21 Feb 2022 23:14:58 +0800	[thread overview]
Message-ID: <23f4a64d-5977-1816-8faa-fe7691ace2ff@gmail.com> (raw)
In-Reply-To: <8d052867-ccff-f00f-7c89-cc26a4bfa347@gmail.com>

On 2/15/2022 11:32 PM, Tianyu Lan wrote:
> On 2/14/2022 9:58 PM, Christoph Hellwig wrote:
>> On Mon, Feb 14, 2022 at 07:28:40PM +0800, Tianyu Lan wrote:
>>> On 2/14/2022 4:19 PM, Christoph Hellwig wrote:
>>>> Adding a function to set the flag doesn't really change much.  As Robin
>>>> pointed out last time you should fine a way to just call
>>>> swiotlb_init_with_tbl directly with the memory allocated the way you
>>>> like it.  Or given that we have quite a few of these trusted hypervisor
>>>> schemes maybe add an argument to swiotlb_init that specifies how to
>>>> allocate the memory.
>>>
>>> Thanks for your suggestion. I will try the first approach first 
>>> approach.
>>
>> Take a look at the SWIOTLB_ANY flag in this WIP branch:
>>
>>     
>> http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/swiotlb-init-cleanup 
>>
>>
>> That being said I'm not sure that either this flag or the existing 
>> powerpc
>> code iѕ actually the right thing to do.  We still need the 4G limited
>> buffer to support devices with addressing limitations.  So I think we 
>> need
>> an additional io_tlb_mem instance for the devices without addressing
>> limitations instead.
>>
> 
> Hi Christoph:
>       Thanks for your patches. I tested these patches in Hyper-V trusted 
> VM and system can't boot up. I am debugging and will report back.

Sorry. The boot failure is not related with these patches and the issue
has been fixed in the latest upstream code.

There is a performance bottleneck due to io tlb mem's spin lock during
performance test. All devices'io queues uses same io tlb mem entry
and the spin lock of io tlb mem introduce overheads. There is a fix 
patch from Andi Kleen in the github. Could you have a look?

https://github.com/intel/tdx/commit/4529b5784c141782c72ec9bd9a92df2b68cb7d45

Thanks.


  reply	other threads:[~2022-02-21 15:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09 12:23 [PATCH V2 0/2] x86/hyperv/Swiotlb: Add swiotlb_set_alloc_from_low_pages() switch function Tianyu Lan
2022-02-09 12:23 ` [PATCH V2 1/2] Swiotlb: Add swiotlb_alloc_from_low_pages switch Tianyu Lan
2022-02-14  8:19   ` Christoph Hellwig
2022-02-14 11:28     ` Tianyu Lan
2022-02-14 13:58       ` Christoph Hellwig
2022-02-15 15:32         ` Tianyu Lan
2022-02-21 15:14           ` Tianyu Lan [this message]
2022-02-22  8:05             ` Christoph Hellwig
2022-02-22 15:07               ` Tianyu Lan
2022-02-22 16:00                 ` Christoph Hellwig
2022-02-23  9:46                   ` Tianyu Lan
2022-02-25 14:28                     ` Tianyu Lan
2022-03-01 11:53                       ` Christoph Hellwig
2022-03-01 14:01                         ` Tianyu Lan
2022-02-09 12:23 ` [PATCH V2 2/2] x86/hyperv: Make swiotlb bounce buffer allocation not just from low pages Tianyu Lan

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=23f4a64d-5977-1816-8faa-fe7691ace2ff@gmail.com \
    --to=ltykernel@gmail.com \
    --cc=Tianyu.Lan@microsoft.com \
    --cc=bp@alien8.de \
    --cc=brijesh.singh@amd.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=hch@infradead.org \
    --cc=hch@lst.de \
    --cc=hpa@zytor.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=konrad.wilk@oracle.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=michael.h.kelley@microsoft.com \
    --cc=mingo@redhat.com \
    --cc=parri.andrea@gmail.com \
    --cc=robin.murphy@arm.com \
    --cc=sthemmin@microsoft.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --cc=vkuznets@redhat.com \
    --cc=wei.liu@kernel.org \
    --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