* [PATCH] x86: bau_msg_head points to a_queue_first in uv_table_bases_finish()
@ 2010-01-15 13:41 Roel Kluin
2010-01-17 7:12 ` Ingo Molnar
0 siblings, 1 reply; 4+ messages in thread
From: Roel Kluin @ 2010-01-15 13:41 UTC (permalink / raw)
To: Ingo Molnar, x86, Andrew Morton, LKML
bau_msg_head should point to bau_msg_head
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
Is this correct?
diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c
index 364d015..3d66331 100644
--- a/arch/x86/kernel/tlb_uv.c
+++ b/arch/x86/kernel/tlb_uv.c
@@ -691,7 +691,7 @@ uv_table_bases_finish(int blade,
continue;
bcp = (struct bau_control *)&per_cpu(bau_control, cpu);
- bcp->bau_msg_head = bau_tablesp->va_queue_first;
+ bcp->bau_msg_head = bau_tablesp->bau_msg_head;
bcp->va_queue_first = bau_tablesp->va_queue_first;
bcp->va_queue_last = bau_tablesp->va_queue_last;
bcp->msg_statuses = bau_tablesp->msg_statuses;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] x86: bau_msg_head points to a_queue_first in uv_table_bases_finish()
2010-01-15 13:41 [PATCH] x86: bau_msg_head points to a_queue_first in uv_table_bases_finish() Roel Kluin
@ 2010-01-17 7:12 ` Ingo Molnar
2010-01-17 12:53 ` Robin Holt
2010-01-18 13:35 ` Cliff Wickman
0 siblings, 2 replies; 4+ messages in thread
From: Ingo Molnar @ 2010-01-17 7:12 UTC (permalink / raw)
To: Roel Kluin, Cliff Wickman, Robin Holt, Mike Travis
Cc: Ingo Molnar, x86, Andrew Morton, LKML
* Roel Kluin <roel.kluin@gmail.com> wrote:
> bau_msg_head should point to bau_msg_head
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> Is this correct?
>
> diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c
> index 364d015..3d66331 100644
> --- a/arch/x86/kernel/tlb_uv.c
> +++ b/arch/x86/kernel/tlb_uv.c
> @@ -691,7 +691,7 @@ uv_table_bases_finish(int blade,
> continue;
>
> bcp = (struct bau_control *)&per_cpu(bau_control, cpu);
> - bcp->bau_msg_head = bau_tablesp->va_queue_first;
> + bcp->bau_msg_head = bau_tablesp->bau_msg_head;
> bcp->va_queue_first = bau_tablesp->va_queue_first;
> bcp->va_queue_last = bau_tablesp->va_queue_last;
> bcp->msg_statuses = bau_tablesp->msg_statuses;
Seems like you either caught a real bug - or that there's a somewhat quirky
initialization sequence here which should be commented upon in the source.
Cliff, Robin, what's your take on Roel's patch?
Thanks,
Ingo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86: bau_msg_head points to a_queue_first in uv_table_bases_finish()
2010-01-17 7:12 ` Ingo Molnar
@ 2010-01-17 12:53 ` Robin Holt
2010-01-18 13:35 ` Cliff Wickman
1 sibling, 0 replies; 4+ messages in thread
From: Robin Holt @ 2010-01-17 12:53 UTC (permalink / raw)
To: Ingo Molnar
Cc: Roel Kluin, Cliff Wickman, Robin Holt, Mike Travis, Ingo Molnar,
x86, Andrew Morton, LKML
On Sun, Jan 17, 2010 at 08:12:27AM +0100, Ingo Molnar wrote:
>
> * Roel Kluin <roel.kluin@gmail.com> wrote:
>
> > bau_msg_head should point to bau_msg_head
> >
> > Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> > ---
> > Is this correct?
> >
> > diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c
> > index 364d015..3d66331 100644
> > --- a/arch/x86/kernel/tlb_uv.c
> > +++ b/arch/x86/kernel/tlb_uv.c
> > @@ -691,7 +691,7 @@ uv_table_bases_finish(int blade,
> > continue;
> >
> > bcp = (struct bau_control *)&per_cpu(bau_control, cpu);
> > - bcp->bau_msg_head = bau_tablesp->va_queue_first;
> > + bcp->bau_msg_head = bau_tablesp->bau_msg_head;
> > bcp->va_queue_first = bau_tablesp->va_queue_first;
> > bcp->va_queue_last = bau_tablesp->va_queue_last;
> > bcp->msg_statuses = bau_tablesp->msg_statuses;
>
> Seems like you either caught a real bug - or that there's a somewhat quirky
> initialization sequence here which should be commented upon in the source.
>
> Cliff, Robin, what's your take on Roel's patch?
I think I will work with Cliff on rewriting uv_payload_queue_init().
Currently, that does not set up bau_msg_head so the code above is
functional. In my opinion, it should set up bau_msg_head. I am sure
I can be convinced otherwise.
Some of the other cleanups:
1) Use the standard alignment macros instead of hand coding our own.
2) Replace the kmalloc with a kzalloc and remove the memset which
currently is zeroing the unaligned allocation instead of the aligned
allocation so it would miss the last (up to 31) bytes of the last
payload.
Thanks,
Robin
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] x86: bau_msg_head points to a_queue_first in uv_table_bases_finish()
2010-01-17 7:12 ` Ingo Molnar
2010-01-17 12:53 ` Robin Holt
@ 2010-01-18 13:35 ` Cliff Wickman
1 sibling, 0 replies; 4+ messages in thread
From: Cliff Wickman @ 2010-01-18 13:35 UTC (permalink / raw)
To: Ingo Molnar
Cc: Roel Kluin, Robin Holt, Mike Travis, Ingo Molnar, x86,
Andrew Morton, LKML
Hi Ingo,
On Sun, Jan 17, 2010 at 08:12:27AM +0100, Ingo Molnar wrote:
>
> * Roel Kluin <roel.kluin@gmail.com> wrote:
>
> > bau_msg_head should point to bau_msg_head
> >
> > Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> > ---
> > Is this correct?
> >
> > diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c
> > index 364d015..3d66331 100644
> > --- a/arch/x86/kernel/tlb_uv.c
> > +++ b/arch/x86/kernel/tlb_uv.c
> > @@ -691,7 +691,7 @@ uv_table_bases_finish(int blade,
> > continue;
> >
> > bcp = (struct bau_control *)&per_cpu(bau_control, cpu);
> > - bcp->bau_msg_head = bau_tablesp->va_queue_first;
> > + bcp->bau_msg_head = bau_tablesp->bau_msg_head;
> > bcp->va_queue_first = bau_tablesp->va_queue_first;
> > bcp->va_queue_last = bau_tablesp->va_queue_last;
> > bcp->msg_statuses = bau_tablesp->msg_statuses;
>
> Seems like you either caught a real bug - or that there's a somewhat quirky
> initialization sequence here which should be commented upon in the source.
>
> Cliff, Robin, what's your take on Roel's patch?
>
> Thanks,
>
> Ingo
The bau_tablesp->bau_msg_head doesn't seem to be initialized, so do not
change the code this way.
bcp->bau_msg_head is correctly initialized to the head of the queue as
it stands.
However I do agree that it is confusing, as there are redundant control
structures, and needs improvement. I intend to submit a new version
of tlb_uv.c soon.
-Cliff
--
Cliff Wickman
SGI
cpw@sgi.com
(651) 683-3824
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-01-18 13:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-15 13:41 [PATCH] x86: bau_msg_head points to a_queue_first in uv_table_bases_finish() Roel Kluin
2010-01-17 7:12 ` Ingo Molnar
2010-01-17 12:53 ` Robin Holt
2010-01-18 13:35 ` Cliff Wickman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox