From: Christoph Hellwig <hch@infradead.org>
To: Tianyu Lan <ltykernel@gmail.com>
Cc: corbet@lwn.net, rafael@kernel.org, len.brown@intel.com,
pavel@ucw.cz, 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, paulmck@kernel.org,
akpm@linux-foundation.org, keescook@chromium.org,
songmuchun@bytedance.com, rdunlap@infradead.org,
damien.lemoal@opensource.wdc.com, michael.h.kelley@microsoft.com,
kys@microsoft.com, Tianyu Lan <Tianyu.Lan@microsoft.com>,
iommu@lists.linux-foundation.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
vkuznets@redhat.com, wei.liu@kernel.org, parri.andrea@gmail.com,
thomas.lendacky@amd.com, linux-hyperv@vger.kernel.org,
kirill.shutemov@intel.com, andi.kleen@intel.com,
Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 1/2] swiotlb: Split up single swiotlb lock
Date: Wed, 29 Jun 2022 07:09:12 -0700 [thread overview]
Message-ID: <YrxdCHRTRS62pAON@infradead.org> (raw)
In-Reply-To: <20220627153150.106995-2-ltykernel@gmail.com>
On Mon, Jun 27, 2022 at 11:31:49AM -0400, Tianyu Lan wrote:
> +/**
> + * struct io_tlb_area - IO TLB memory area descriptor
> + *
> + * This is a single area with a single lock.
> + *
> + * @used: The number of used IO TLB block.
> + * @index: The slot index to start searching in this area for next round.
> + * @lock: The lock to protect the above data structures in the map and
> + * unmap calls.
> + */
> +struct io_tlb_area {
> + unsigned long used;
> + unsigned int index;
> + spinlock_t lock;
> +};
As already mentioned last time, please move this into swiotlb.c,
swiotlb.h only uses a pointer to this structure.
> static void swiotlb_init_io_tlb_mem(struct io_tlb_mem *mem, phys_addr_t start,
> - unsigned long nslabs, unsigned int flags, bool late_alloc)
> + unsigned long nslabs, unsigned int flags,
> + bool late_alloc, unsigned int nareas)
Nit: the two tab indentation for prototype continuations is a lot easier
to maintain, so don't graciously switch away from it.
> + alloc_size - (offset + ((i - slot_index) << IO_TLB_SHIFT));
Overly long line here.
next prev parent reply other threads:[~2022-06-29 14:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-27 15:31 [PATCH 0/2] swiotlb: Split up single swiotlb lock Tianyu Lan
2022-06-27 15:31 ` [PATCH 1/2] " Tianyu Lan
2022-06-29 14:09 ` Christoph Hellwig [this message]
2022-06-27 15:31 ` [PATCH 2/2] x86/ACPI: Set swiotlb area according to the number of lapic entry in MADT Tianyu Lan
2022-06-29 14:04 ` Christoph Hellwig
2022-06-30 17:02 ` Tianyu Lan
2022-07-06 8:00 ` Christoph Hellwig
2022-07-06 8:57 ` Tianyu Lan
2022-07-06 9:02 ` Christoph Hellwig
2022-07-06 10:21 ` 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=YrxdCHRTRS62pAON@infradead.org \
--to=hch@infradead.org \
--cc=Tianyu.Lan@microsoft.com \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=andi.kleen@intel.com \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=damien.lemoal@opensource.wdc.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=iommu@lists.linux-foundation.org \
--cc=keescook@chromium.org \
--cc=kirill.shutemov@intel.com \
--cc=kys@microsoft.com \
--cc=len.brown@intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=ltykernel@gmail.com \
--cc=m.szyprowski@samsung.com \
--cc=michael.h.kelley@microsoft.com \
--cc=mingo@redhat.com \
--cc=parri.andrea@gmail.com \
--cc=paulmck@kernel.org \
--cc=pavel@ucw.cz \
--cc=rafael@kernel.org \
--cc=rdunlap@infradead.org \
--cc=robin.murphy@arm.com \
--cc=songmuchun@bytedance.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;
as well as URLs for NNTP newsgroup(s).