All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hanjun Guo <guohanjun@huawei.com>
To: Ganapatrao Kulkarni <gklkml16@gmail.com>,
	Marc Zyngier <marc.zyngier@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	linux-kernel@vger.kernel.org, linuxarm@huawei.com,
	linux-acpi@vger.kernel.org, Hanjun Guo <hanjun.guo@linaro.org>,
	Ganapatrao Kulkarni <ganapatrao.kulkarni@cavium.com>,
	linux-arm-kernel@lists.infradead.org,
	Jayachandran.Nair@cavium.com
Subject: Re: [PATCH] irqchip/gic-v3-its: Allow GIC ITS number more than MAX_NUMNODES
Date: Sat, 22 Jul 2017 11:52:37 +0800	[thread overview]
Message-ID: <5972CC05.9010702@huawei.com> (raw)
In-Reply-To: <CAKTKpr7tmavUKyqxYabdfYOpV0V9TLySmwCwTyng5zZoxy9nqg@mail.gmail.com>

On 2017/7/21 19:42, Ganapatrao Kulkarni wrote:
> Hi Hanjun,
>
>
> On Fri, Jul 21, 2017 at 4:50 PM, Marc Zyngier <marc.zyngier@arm.com> wrote:
>> On 21/07/17 11:06, Hanjun Guo wrote:
>>> On 2017/7/21 17:51, Hanjun Guo wrote:
>>>> From: Hanjun Guo <hanjun.guo@linaro.org>
>>>>
>>>> When running 4.13-rc1 on top of D05, I got the boot log:
>>>>
>>>> [    0.000000] SRAT: PXM 0 -> ITS 0 -> Node 0
>>>> [    0.000000] SRAT: PXM 0 -> ITS 1 -> Node 0
>>>> [    0.000000] SRAT: PXM 0 -> ITS 2 -> Node 0
>>>> [    0.000000] SRAT: PXM 1 -> ITS 3 -> Node 1
>>>> [    0.000000] SRAT: ITS affinity exceeding max count[4]
>>>>
>>>> This is wrong on D05 as we have 8 ITSes with 4 NUMA nodes.
> Used static array to keep it simple.  we can have either dynamic array
> or increase static array size (which is in init data) to a larger
> number.
> We may have to go for dynamic array to be more sane. You can refer my
> v2 patch [1], which was doing dynamic allocation and avoids
> 2 calls to acpi parser as done in this patch.
>
> [1] https://patchwork.kernel.org/patch/9798659/

Hmm, although scanning the SRAT twice is bad, it will keep the
code simple, and no need to alloc the memory every time when we
find a ITS affinity entry, you need to free that memory when
ITS probing is done.

I will post a patch later, please take a look if it's ok to you :)

Thanks
Hanjun


WARNING: multiple messages have this Message-ID (diff)
From: Hanjun Guo <guohanjun@huawei.com>
To: Ganapatrao Kulkarni <gklkml16@gmail.com>,
	Marc Zyngier <marc.zyngier@arm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	<linux-kernel@vger.kernel.org>, <linuxarm@huawei.com>,
	<linux-acpi@vger.kernel.org>, Hanjun Guo <hanjun.guo@linaro.org>,
	Ganapatrao Kulkarni <ganapatrao.kulkarni@cavium.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<Jayachandran.Nair@cavium.com>
Subject: Re: [PATCH] irqchip/gic-v3-its: Allow GIC ITS number more than MAX_NUMNODES
Date: Sat, 22 Jul 2017 11:52:37 +0800	[thread overview]
Message-ID: <5972CC05.9010702@huawei.com> (raw)
In-Reply-To: <CAKTKpr7tmavUKyqxYabdfYOpV0V9TLySmwCwTyng5zZoxy9nqg@mail.gmail.com>

On 2017/7/21 19:42, Ganapatrao Kulkarni wrote:
> Hi Hanjun,
>
>
> On Fri, Jul 21, 2017 at 4:50 PM, Marc Zyngier <marc.zyngier@arm.com> wrote:
>> On 21/07/17 11:06, Hanjun Guo wrote:
>>> On 2017/7/21 17:51, Hanjun Guo wrote:
>>>> From: Hanjun Guo <hanjun.guo@linaro.org>
>>>>
>>>> When running 4.13-rc1 on top of D05, I got the boot log:
>>>>
>>>> [    0.000000] SRAT: PXM 0 -> ITS 0 -> Node 0
>>>> [    0.000000] SRAT: PXM 0 -> ITS 1 -> Node 0
>>>> [    0.000000] SRAT: PXM 0 -> ITS 2 -> Node 0
>>>> [    0.000000] SRAT: PXM 1 -> ITS 3 -> Node 1
>>>> [    0.000000] SRAT: ITS affinity exceeding max count[4]
>>>>
>>>> This is wrong on D05 as we have 8 ITSes with 4 NUMA nodes.
> Used static array to keep it simple.  we can have either dynamic array
> or increase static array size (which is in init data) to a larger
> number.
> We may have to go for dynamic array to be more sane. You can refer my
> v2 patch [1], which was doing dynamic allocation and avoids
> 2 calls to acpi parser as done in this patch.
>
> [1] https://patchwork.kernel.org/patch/9798659/

Hmm, although scanning the SRAT twice is bad, it will keep the
code simple, and no need to alloc the memory every time when we
find a ITS affinity entry, you need to free that memory when
ITS probing is done.

I will post a patch later, please take a look if it's ok to you :)

Thanks
Hanjun

WARNING: multiple messages have this Message-ID (diff)
From: guohanjun@huawei.com (Hanjun Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] irqchip/gic-v3-its: Allow GIC ITS number more than MAX_NUMNODES
Date: Sat, 22 Jul 2017 11:52:37 +0800	[thread overview]
Message-ID: <5972CC05.9010702@huawei.com> (raw)
In-Reply-To: <CAKTKpr7tmavUKyqxYabdfYOpV0V9TLySmwCwTyng5zZoxy9nqg@mail.gmail.com>

On 2017/7/21 19:42, Ganapatrao Kulkarni wrote:
> Hi Hanjun,
>
>
> On Fri, Jul 21, 2017 at 4:50 PM, Marc Zyngier <marc.zyngier@arm.com> wrote:
>> On 21/07/17 11:06, Hanjun Guo wrote:
>>> On 2017/7/21 17:51, Hanjun Guo wrote:
>>>> From: Hanjun Guo <hanjun.guo@linaro.org>
>>>>
>>>> When running 4.13-rc1 on top of D05, I got the boot log:
>>>>
>>>> [    0.000000] SRAT: PXM 0 -> ITS 0 -> Node 0
>>>> [    0.000000] SRAT: PXM 0 -> ITS 1 -> Node 0
>>>> [    0.000000] SRAT: PXM 0 -> ITS 2 -> Node 0
>>>> [    0.000000] SRAT: PXM 1 -> ITS 3 -> Node 1
>>>> [    0.000000] SRAT: ITS affinity exceeding max count[4]
>>>>
>>>> This is wrong on D05 as we have 8 ITSes with 4 NUMA nodes.
> Used static array to keep it simple.  we can have either dynamic array
> or increase static array size (which is in init data) to a larger
> number.
> We may have to go for dynamic array to be more sane. You can refer my
> v2 patch [1], which was doing dynamic allocation and avoids
> 2 calls to acpi parser as done in this patch.
>
> [1] https://patchwork.kernel.org/patch/9798659/

Hmm, although scanning the SRAT twice is bad, it will keep the
code simple, and no need to alloc the memory every time when we
find a ITS affinity entry, you need to free that memory when
ITS probing is done.

I will post a patch later, please take a look if it's ok to you :)

Thanks
Hanjun

  reply	other threads:[~2017-07-22  3:53 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-21  9:51 [PATCH] irqchip/gic-v3-its: Allow GIC ITS number more than MAX_NUMNODES Hanjun Guo
2017-07-21  9:51 ` Hanjun Guo
2017-07-21  9:51 ` Hanjun Guo
2017-07-21 10:06 ` Hanjun Guo
2017-07-21 10:06   ` Hanjun Guo
2017-07-21 10:06   ` Hanjun Guo
2017-07-21 10:50   ` Hanjun Guo
2017-07-21 10:50     ` Hanjun Guo
2017-07-21 10:50     ` Hanjun Guo
2017-07-21 11:20   ` Marc Zyngier
2017-07-21 11:20     ` Marc Zyngier
2017-07-21 11:42     ` Ganapatrao Kulkarni
2017-07-21 11:42       ` Ganapatrao Kulkarni
2017-07-22  3:52       ` Hanjun Guo [this message]
2017-07-22  3:52         ` Hanjun Guo
2017-07-22  3:52         ` Hanjun Guo
2017-07-22  3:44     ` Hanjun Guo
2017-07-22  3:44       ` Hanjun Guo
2017-07-22  3:44       ` Hanjun Guo

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=5972CC05.9010702@huawei.com \
    --to=guohanjun@huawei.com \
    --cc=Jayachandran.Nair@cavium.com \
    --cc=ganapatrao.kulkarni@cavium.com \
    --cc=gklkml16@gmail.com \
    --cc=hanjun.guo@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=marc.zyngier@arm.com \
    --cc=tglx@linutronix.de \
    /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.