From: Christoph Hellwig <hch@lst.de>
To: "Song Bao Hua (Barry Song)" <song.bao.hua@hisilicon.com>
Cc: "catalin.marinas@arm.com" <catalin.marinas@arm.com>,
Mike Rapoport <rppt@linux.ibm.com>,
Steve Capper <steve.capper@arm.com>,
"robin.murphy@arm.com" <robin.murphy@arm.com>,
Linuxarm <linuxarm@huawei.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
"Zengtao \(B\)" <prime.zeng@hisilicon.com>,
"ganapatrao.kulkarni@cavium.com" <ganapatrao.kulkarni@cavium.com>,
Andrew Morton <akpm@linux-foundation.org>,
huangdaode <huangdaode@huawei.com>,
"will@kernel.org" <will@kernel.org>,
Christoph Hellwig <hch@lst.de>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v4 1/2] dma-direct: provide the ability to reserve per-numa CMA
Date: Tue, 28 Jul 2020 14:22:44 +0200 [thread overview]
Message-ID: <20200728122244.GA3639@lst.de> (raw)
In-Reply-To: <B926444035E5E2439431908E3842AFD25C329D@DGGEMI525-MBS.china.huawei.com>
On Tue, Jul 28, 2020 at 12:19:03PM +0000, Song Bao Hua (Barry Song) wrote:
> I am sorry I haven't got your point yet. Do you mean something like the below?
>
> arch/arm64/Kconfig:
> config CMDLINE
> string "Default kernel command string"
> - default ""
> + default "pernuma_cma=16M"
> help
> Provide a set of default command-line options at build time by
> entering them here. As a minimum, you should specify the the
> root device (e.g. root=/dev/nfs).
Yes.
> A background of the current code is that Linux distributions can usually use arch/arm64/configs/defconfig
> directly to build kernel. cmdline can be easily ignored during the generation of Linux distributions.
I've not actually heard of a distro shipping defconfig yet..
>
> > if a way to expose this in the device tree might be useful, but people
> > more familiar with the device tree and the arm code will have to chime
> > in on that.
>
> Not sure if it is an useful user case as we are using ACPI but not device tree since it is an ARM64
> server with NUMA.
Well, than maybe ACPI experts need to chime in on this.
> > This seems to have lost the dma_contiguous_default_area NULL check.
>
> cma_alloc() is doing the check by returning NULL if cma is NULL.
>
> struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align,
> bool no_warn)
> {
> ...
> if (!cma || !cma->count)
> return NULL;
> }
>
> But I agree here the code can check before calling cma_alloc_aligned.
Oh, indeed. Please split the removal of the NULL check in to a prep
patch then.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: "Song Bao Hua (Barry Song)" <song.bao.hua@hisilicon.com>
Cc: "catalin.marinas@arm.com" <catalin.marinas@arm.com>,
Mike Rapoport <rppt@linux.ibm.com>,
Steve Capper <steve.capper@arm.com>,
"robin.murphy@arm.com" <robin.murphy@arm.com>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
Linuxarm <linuxarm@huawei.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
Nicolas Saenz Julienne <nsaenzjulienne@suse.de>,
"Zengtao \(B\)" <prime.zeng@hisilicon.com>,
"ganapatrao.kulkarni@cavium.com" <ganapatrao.kulkarni@cavium.com>,
Andrew Morton <akpm@linux-foundation.org>,
huangdaode <huangdaode@huawei.com>,
"will@kernel.org" <will@kernel.org>,
Christoph Hellwig <hch@lst.de>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"m.szyprowski@samsung.com" <m.szyprowski@samsung.com>
Subject: Re: [PATCH v4 1/2] dma-direct: provide the ability to reserve per-numa CMA
Date: Tue, 28 Jul 2020 14:22:44 +0200 [thread overview]
Message-ID: <20200728122244.GA3639@lst.de> (raw)
In-Reply-To: <B926444035E5E2439431908E3842AFD25C329D@DGGEMI525-MBS.china.huawei.com>
On Tue, Jul 28, 2020 at 12:19:03PM +0000, Song Bao Hua (Barry Song) wrote:
> I am sorry I haven't got your point yet. Do you mean something like the below?
>
> arch/arm64/Kconfig:
> config CMDLINE
> string "Default kernel command string"
> - default ""
> + default "pernuma_cma=16M"
> help
> Provide a set of default command-line options at build time by
> entering them here. As a minimum, you should specify the the
> root device (e.g. root=/dev/nfs).
Yes.
> A background of the current code is that Linux distributions can usually use arch/arm64/configs/defconfig
> directly to build kernel. cmdline can be easily ignored during the generation of Linux distributions.
I've not actually heard of a distro shipping defconfig yet..
>
> > if a way to expose this in the device tree might be useful, but people
> > more familiar with the device tree and the arm code will have to chime
> > in on that.
>
> Not sure if it is an useful user case as we are using ACPI but not device tree since it is an ARM64
> server with NUMA.
Well, than maybe ACPI experts need to chime in on this.
> > This seems to have lost the dma_contiguous_default_area NULL check.
>
> cma_alloc() is doing the check by returning NULL if cma is NULL.
>
> struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align,
> bool no_warn)
> {
> ...
> if (!cma || !cma->count)
> return NULL;
> }
>
> But I agree here the code can check before calling cma_alloc_aligned.
Oh, indeed. Please split the removal of the NULL check in to a prep
patch then.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: "Song Bao Hua (Barry Song)" <song.bao.hua@hisilicon.com>
Cc: Christoph Hellwig <hch@lst.de>,
"m.szyprowski@samsung.com" <m.szyprowski@samsung.com>,
"robin.murphy@arm.com" <robin.murphy@arm.com>,
"will@kernel.org" <will@kernel.org>,
"ganapatrao.kulkarni@cavium.com" <ganapatrao.kulkarni@cavium.com>,
"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
Linuxarm <linuxarm@huawei.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Zengtao (B)" <prime.zeng@hisilicon.com>,
huangdaode <huangdaode@huawei.com>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
Nicolas Saenz Julienne <nsaenzjulienne@suse.de>,
Steve Capper <steve.capper@arm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Mike Rapoport <rppt@linux.ibm.com>
Subject: Re: [PATCH v4 1/2] dma-direct: provide the ability to reserve per-numa CMA
Date: Tue, 28 Jul 2020 14:22:44 +0200 [thread overview]
Message-ID: <20200728122244.GA3639@lst.de> (raw)
In-Reply-To: <B926444035E5E2439431908E3842AFD25C329D@DGGEMI525-MBS.china.huawei.com>
On Tue, Jul 28, 2020 at 12:19:03PM +0000, Song Bao Hua (Barry Song) wrote:
> I am sorry I haven't got your point yet. Do you mean something like the below?
>
> arch/arm64/Kconfig:
> config CMDLINE
> string "Default kernel command string"
> - default ""
> + default "pernuma_cma=16M"
> help
> Provide a set of default command-line options at build time by
> entering them here. As a minimum, you should specify the the
> root device (e.g. root=/dev/nfs).
Yes.
> A background of the current code is that Linux distributions can usually use arch/arm64/configs/defconfig
> directly to build kernel. cmdline can be easily ignored during the generation of Linux distributions.
I've not actually heard of a distro shipping defconfig yet..
>
> > if a way to expose this in the device tree might be useful, but people
> > more familiar with the device tree and the arm code will have to chime
> > in on that.
>
> Not sure if it is an useful user case as we are using ACPI but not device tree since it is an ARM64
> server with NUMA.
Well, than maybe ACPI experts need to chime in on this.
> > This seems to have lost the dma_contiguous_default_area NULL check.
>
> cma_alloc() is doing the check by returning NULL if cma is NULL.
>
> struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align,
> bool no_warn)
> {
> ...
> if (!cma || !cma->count)
> return NULL;
> }
>
> But I agree here the code can check before calling cma_alloc_aligned.
Oh, indeed. Please split the removal of the NULL check in to a prep
patch then.
next prev parent reply other threads:[~2020-07-28 12:22 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-23 13:13 [PATCH v4 0/2] make dma_alloc_coherent NUMA-aware by per-NUMA CMA Barry Song
2020-07-23 13:13 ` Barry Song
2020-07-23 13:13 ` Barry Song
2020-07-23 13:13 ` [PATCH v4 1/2] dma-direct: provide the ability to reserve per-numa CMA Barry Song
2020-07-23 13:13 ` Barry Song
2020-07-23 13:13 ` Barry Song
2020-07-28 11:52 ` Christoph Hellwig
2020-07-28 11:52 ` Christoph Hellwig
2020-07-28 11:52 ` Christoph Hellwig
2020-07-28 12:19 ` Song Bao Hua (Barry Song)
2020-07-28 12:19 ` Song Bao Hua (Barry Song)
2020-07-28 12:19 ` Song Bao Hua (Barry Song)
2020-07-28 12:22 ` Christoph Hellwig [this message]
2020-07-28 12:22 ` Christoph Hellwig
2020-07-28 12:22 ` Christoph Hellwig
2020-07-29 11:21 ` Song Bao Hua (Barry Song)
2020-07-29 11:21 ` Song Bao Hua (Barry Song)
2020-07-29 11:21 ` Song Bao Hua (Barry Song)
2020-07-23 13:13 ` [PATCH v4 2/2] arm64: mm: reserve per-numa CMA to localize coherent dma buffers Barry Song
2020-07-23 13:13 ` Barry Song
2020-07-23 13:13 ` Barry Song
2020-07-28 11:53 ` Christoph Hellwig
2020-07-28 11:53 ` Christoph Hellwig
2020-07-28 11:53 ` Christoph Hellwig
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=20200728122244.GA3639@lst.de \
--to=hch@lst.de \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=ganapatrao.kulkarni@cavium.com \
--cc=huangdaode@huawei.com \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=prime.zeng@hisilicon.com \
--cc=robin.murphy@arm.com \
--cc=rppt@linux.ibm.com \
--cc=song.bao.hua@hisilicon.com \
--cc=steve.capper@arm.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.