2006-10-24 04:15:34

by Yinghai Lu

[permalink] [raw]
Subject: [PATCH] x86_64 irq: reuse vector for __assign_irq_vector

in phys flat mode, when using set_xxx_irq_affinity to irq balance from
one cpu to another, _assign_irq_vector will get to increase last used
vector and get new vector. this will use up the vector if enough
set_xxx_irq_affintiy are called. and end with using same vector in
different cpu for different irq. (that is not what we want, we only
want to use same vector in different cpu for different irq when more
than 0x240 irq needed). To keep it simple, the vector should be reused
instead of getting new vector.

Also according to Eric's review, make it more generic to be used with
flat mode too.

This patch need to be applied over Eric's irq: cpu_online_map patch.


Cc: Eric W. Biederman <[email protected]>
Cc: Muli Ben-Yehuda <[email protected]>
Signed-off-by: Yinghai Lu <[email protected]>


Attachments:
(No filename) (802.00 B)
io_apic_reuse_vector.diff (2.40 kB)
Download all attachments

2006-10-24 09:06:23

by Muli Ben-Yehuda

[permalink] [raw]
Subject: Re: [PATCH] x86_64 irq: reuse vector for __assign_irq_vector

On Mon, Oct 23, 2006 at 09:15:31PM -0700, yhlu wrote:
> in phys flat mode, when using set_xxx_irq_affinity to irq balance from
> one cpu to another, _assign_irq_vector will get to increase last used
> vector and get new vector. this will use up the vector if enough
> set_xxx_irq_affintiy are called. and end with using same vector in
> different cpu for different irq. (that is not what we want, we only
> want to use same vector in different cpu for different irq when more
> than 0x240 irq needed). To keep it simple, the vector should be reused
> instead of getting new vector.
>
> Also according to Eric's review, make it more generic to be used with
> flat mode too.
>
> This patch need to be applied over Eric's irq: cpu_online_map patch.
>
>
> Cc: Eric W. Biederman <[email protected]>
> Cc: Muli Ben-Yehuda <[email protected]>
> Signed-off-by: Yinghai Lu <[email protected]>

Boots fine and survives a quick stress test.

Cheers,
Muli

2006-10-24 17:05:07

by Andi Kleen

[permalink] [raw]
Subject: Re: [PATCH] x86_64 irq: reuse vector for __assign_irq_vector

On Mon, Oct 23, 2006 at 09:15:31PM -0700, yhlu wrote:
> in phys flat mode, when using set_xxx_irq_affinity to irq balance from
> one cpu to another, _assign_irq_vector will get to increase last used
> vector and get new vector. this will use up the vector if enough
> set_xxx_irq_affintiy are called. and end with using same vector in
> different cpu for different irq. (that is not what we want, we only
> want to use same vector in different cpu for different irq when more
> than 0x240 irq needed). To keep it simple, the vector should be reused
> instead of getting new vector.
>
> Also according to Eric's review, make it more generic to be used with
> flat mode too.

Is that still needed with Eric's latest patches? I suppose not?

-Andi

2006-10-24 18:45:22

by Lu, Yinghai

[permalink] [raw]
Subject: Re: [PATCH] x86_64 irq: reuse vector for __assign_irq_vector

>From: Andi Kleen [mailto:[email protected]]
>Is that still needed with Eric's latest patches? I suppose not?

It needs Eric's

x86_64-irq-simplify-the-vector-allocator.patch
x86_64-irq-only-look-at-per_cpu-data-for-online-cpus.patch

Those two are in -mm tree now.

Otherwise it can not be applied without FAIL.

YH



2006-10-25 04:00:31

by Lu, Yinghai

[permalink] [raw]
Subject: Re: [PATCH] x86_64 irq: reuse vector for __assign_irq_vector

Andi,

I think this patch could be in your tree after Eric's tree is getting
into mainstream.

YH

On 10/24/06, Lu, Yinghai <[email protected]> wrote:
> >From: Andi Kleen [mailto:[email protected]]
> >Is that still needed with Eric's latest patches? I suppose not?
>
> It needs Eric's
>
> x86_64-irq-simplify-the-vector-allocator.patch
> x86_64-irq-only-look-at-per_cpu-data-for-online-cpus.patch
>
> Those two are in -mm tree now.
>
> Otherwise it can not be applied without FAIL.
>
> YH
>

2006-10-26 09:05:15

by Lu, Yinghai

[permalink] [raw]
Subject: Re: [PATCH] x86_64 irq: reuse vector for __assign_irq_vector

Andi,
please check the revised patch: It can be appied to current linus't tree.

in phys flat mode, when using set_xxx_irq_affinity to irq balance from
one cpu to another, _assign_irq_vector will get to increase last used
vector and get new vector. this will use up the vector if enough
set_xxx_irq_affintiy are called. and end with using same vector in
different cpu for different irq. (that is not what we want, we only
want to use same vector in different cpu for different irq when more
than 0x240 irq needed). To keep it simple, the vector should be reused
instead of getting new vector.

Also according to Eric's review, make it more generic to be used with
flat mode too.

It also check if new domain and old domain is equal, to avoid extra operation.


Cc: Eric W. Biederman <[email protected]>
Cc: Muli Ben-Yehuda <[email protected]>
Signed-off-by: Yinghai Lu <[email protected]>


Attachments:
(No filename) (893.00 B)
io_apic_reuse_vector_1026.diff (2.66 kB)
Download all attachments

2006-10-26 18:11:00

by Muli Ben-Yehuda

[permalink] [raw]
Subject: Re: [PATCH] x86_64 irq: reuse vector for __assign_irq_vector

On Thu, Oct 26, 2006 at 02:04:57AM -0700, Yinghai Lu wrote:
> Andi,
> please check the revised patch: It can be appied to current linus't tree.
>
> in phys flat mode, when using set_xxx_irq_affinity to irq balance from
> one cpu to another, _assign_irq_vector will get to increase last used
> vector and get new vector. this will use up the vector if enough
> set_xxx_irq_affintiy are called. and end with using same vector in
> different cpu for different irq. (that is not what we want, we only
> want to use same vector in different cpu for different irq when more
> than 0x240 irq needed). To keep it simple, the vector should be reused
> instead of getting new vector.
>
> Also according to Eric's review, make it more generic to be used with
> flat mode too.
>
> It also check if new domain and old domain is equal, to avoid extra
> operation.

Works fine for mee.

Cheers,
Muli

2006-10-27 02:35:11

by Andi Kleen

[permalink] [raw]
Subject: Re: [PATCH] x86_64 irq: reuse vector for __assign_irq_vector

On Thu, Oct 26, 2006 at 02:04:57AM -0700, Yinghai Lu wrote:
> Andi,
> please check the revised patch: It can be appied to current linus't tree.
>
> in phys flat mode, when using set_xxx_irq_affinity to irq balance from
> one cpu to another, _assign_irq_vector will get to increase last used
> vector and get new vector. this will use up the vector if enough
> set_xxx_irq_affintiy are called. and end with using same vector in
> different cpu for different irq. (that is not what we want, we only
> want to use same vector in different cpu for different irq when more
> than 0x240 irq needed). To keep it simple, the vector should be reused
> instead of getting new vector.
>
> Also according to Eric's review, make it more generic to be used with
> flat mode too.

Eric, do you ack the patch?

-andi

2006-10-28 17:46:25

by Andi Kleen

[permalink] [raw]
Subject: Re: [PATCH] x86_64 irq: reuse vector for __assign_irq_vector

On Mon, Oct 23, 2006 at 09:15:31PM -0700, yhlu wrote:
> in phys flat mode, when using set_xxx_irq_affinity to irq balance from
> one cpu to another, _assign_irq_vector will get to increase last used
> vector and get new vector. this will use up the vector if enough
> set_xxx_irq_affintiy are called. and end with using same vector in
> different cpu for different irq. (that is not what we want, we only
> want to use same vector in different cpu for different irq when more
> than 0x240 irq needed). To keep it simple, the vector should be reused
> instead of getting new vector.
>
> Also according to Eric's review, make it more generic to be used with
> flat mode too.
>
Added thanks

> This patch need to be applied over Eric's irq: cpu_online_map patch.

Hmm, i'm not sure I got that. Which was patch was it exactly

Or can you please double check it is ok in 2.6.19rc3 +
ftp://ftp.firstfloor.org/pub/ak/x86_64/quilt/x86_64-2.6.19-rc3-061028-1.bz2

Thanks,

-Andi

2006-10-28 18:53:32

by Lu, Yinghai

[permalink] [raw]
Subject: Re: [PATCH] x86_64 irq: reuse vector for __assign_irq_vector

On 28 Oct 2006 19:46:22 +0200, Andi Kleen <[email protected]> wrote:
> On Mon, Oct 23, 2006 at 09:15:31PM -0700, yhlu wrote:

> Hmm, i'm not sure I got that. Which was patch was it exactly


Eric's online cpus patch is already in the maintream.

Please use the diff in

http://lkml.org/lkml/2006/10/26/38

Thanks

YH