* [PATCH] Documentation: x86: update the thread_info's position
@ 2020-12-05 5:01 Mingzhe Yang
2020-12-21 16:57 ` Jonathan Corbet
0 siblings, 1 reply; 3+ messages in thread
From: Mingzhe Yang @ 2020-12-05 5:01 UTC (permalink / raw)
To: tglx
Cc: mingo, bp, hpa, corbet, x86, linux-kernel, linux-doc,
David.Laight, Mingzhe Yang
Prior to kernel 4.9 the thread_info structure was at the bottom of
the kernel stack. kernel 4.9 moved it into the task_struct.
See commits c65eacb ("sched/core: Allow putting thread_info into
task_struct"), 15f4eae ("x86: Move thread_info into task_struct")
and 883d50f ("scripts/gdb: fix get_thread_info").
Signed-off-by: Mingzhe Yang <cainiao666999@gmail.com>
---
Documentation/x86/kernel-stacks.rst | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/x86/kernel-stacks.rst b/Documentation/x86/kernel-stacks.rst
index 6b0bcf0..e9097f3 100644
--- a/Documentation/x86/kernel-stacks.rst
+++ b/Documentation/x86/kernel-stacks.rst
@@ -15,7 +15,8 @@ Like all other architectures, x86_64 has a kernel stack for every
active thread. These thread stacks are THREAD_SIZE (2*PAGE_SIZE) big.
These stacks contain useful data as long as a thread is alive or a
zombie. While the thread is in user space the kernel stack is empty
-except for the thread_info structure at the bottom.
+except for the thread_info structure at the bottom (since kernel 4.9,
+the thread_info structure has been moved into task_struct).
In addition to the per thread stacks, there are specialized stacks
associated with each CPU. These stacks are only used while the kernel
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Documentation: x86: update the thread_info's position
2020-12-05 5:01 [PATCH] Documentation: x86: update the thread_info's position Mingzhe Yang
@ 2020-12-21 16:57 ` Jonathan Corbet
2020-12-22 1:12 ` Mingzhe Yang
0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Corbet @ 2020-12-21 16:57 UTC (permalink / raw)
To: Mingzhe Yang
Cc: tglx, mingo, bp, hpa, x86, linux-kernel, linux-doc, David.Laight
On Sat, 5 Dec 2020 13:01:36 +0800
Mingzhe Yang <cainiao666999@gmail.com> wrote:
> Prior to kernel 4.9 the thread_info structure was at the bottom of
> the kernel stack. kernel 4.9 moved it into the task_struct.
>
> See commits c65eacb ("sched/core: Allow putting thread_info into
> task_struct"), 15f4eae ("x86: Move thread_info into task_struct")
> and 883d50f ("scripts/gdb: fix get_thread_info").
>
> Signed-off-by: Mingzhe Yang <cainiao666999@gmail.com>
> ---
> Documentation/x86/kernel-stacks.rst | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/x86/kernel-stacks.rst b/Documentation/x86/kernel-stacks.rst
> index 6b0bcf0..e9097f3 100644
> --- a/Documentation/x86/kernel-stacks.rst
> +++ b/Documentation/x86/kernel-stacks.rst
> @@ -15,7 +15,8 @@ Like all other architectures, x86_64 has a kernel stack for every
> active thread. These thread stacks are THREAD_SIZE (2*PAGE_SIZE) big.
> These stacks contain useful data as long as a thread is alive or a
> zombie. While the thread is in user space the kernel stack is empty
> -except for the thread_info structure at the bottom.
> +except for the thread_info structure at the bottom (since kernel 4.9,
> +the thread_info structure has been moved into task_struct).
So this has been sitting in my inbox for a bit, sorry. This seems worth
fixing, but is this the correct fix? The documentation should reflect the
current kernel, rather than what once was with a "(it's not actually that
way anymore)" note. Is the kernel stack truly empty now? If so we should
just say that; otherwise say what's lurking there in current kernels.
Thanks,
jon
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Documentation: x86: update the thread_info's position
2020-12-21 16:57 ` Jonathan Corbet
@ 2020-12-22 1:12 ` Mingzhe Yang
0 siblings, 0 replies; 3+ messages in thread
From: Mingzhe Yang @ 2020-12-22 1:12 UTC (permalink / raw)
To: Jonathan Corbet
Cc: tglx, mingo, bp, hpa, x86, linux-kernel, linux-doc, David Laight
Thanks a million!
I truly appreciate your review!
On Tue, Dec 22, 2020 at 12:57 AM Jonathan Corbet <corbet@lwn.net> wrote:
>
> On Sat, 5 Dec 2020 13:01:36 +0800
> Mingzhe Yang <cainiao666999@gmail.com> wrote:
>
> > Prior to kernel 4.9 the thread_info structure was at the bottom of
> > the kernel stack. kernel 4.9 moved it into the task_struct.
> >
> > See commits c65eacb ("sched/core: Allow putting thread_info into
> > task_struct"), 15f4eae ("x86: Move thread_info into task_struct")
> > and 883d50f ("scripts/gdb: fix get_thread_info").
> >
> > Signed-off-by: Mingzhe Yang <cainiao666999@gmail.com>
> > ---
> > Documentation/x86/kernel-stacks.rst | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/x86/kernel-stacks.rst b/Documentation/x86/kernel-stacks.rst
> > index 6b0bcf0..e9097f3 100644
> > --- a/Documentation/x86/kernel-stacks.rst
> > +++ b/Documentation/x86/kernel-stacks.rst
> > @@ -15,7 +15,8 @@ Like all other architectures, x86_64 has a kernel stack for every
> > active thread. These thread stacks are THREAD_SIZE (2*PAGE_SIZE) big.
> > These stacks contain useful data as long as a thread is alive or a
> > zombie. While the thread is in user space the kernel stack is empty
> > -except for the thread_info structure at the bottom.
> > +except for the thread_info structure at the bottom (since kernel 4.9,
> > +the thread_info structure has been moved into task_struct).
>
> So this has been sitting in my inbox for a bit, sorry. This seems worth
> fixing, but is this the correct fix? The documentation should reflect the
> current kernel, rather than what once was with a "(it's not actually that
> way anymore)" note. Is the kernel stack truly empty now? If so we should
> just say that; otherwise say what's lurking there in current kernels.
>
> Thanks,
>
> jon
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-22 1:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-05 5:01 [PATCH] Documentation: x86: update the thread_info's position Mingzhe Yang
2020-12-21 16:57 ` Jonathan Corbet
2020-12-22 1:12 ` Mingzhe Yang
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).