From: Nicholas Piggin <npiggin@gmail.com>
To: Christophe LEROY <christophe.leroy@c-s.fr>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
aneesh.kumar@linux.vnet.ibm.com, linux-kernel@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC PATCH v3 4/7] powerpc: regain entire stack space
Date: Wed, 3 Oct 2018 17:07:36 +1000 [thread overview]
Message-ID: <20181003170736.34082f4d@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <38d58749-c058-a6d7-1ca2-23abe9dd34a3@c-s.fr>
On Wed, 3 Oct 2018 08:45:25 +0200
Christophe LEROY <christophe.leroy@c-s.fr> wrote:
> Le 03/10/2018 à 08:30, Nicholas Piggin a écrit :
> > On Wed, 3 Oct 2018 07:52:59 +0200
> > Christophe LEROY <christophe.leroy@c-s.fr> wrote:
> >
> >> Le 03/10/2018 à 07:34, Nicholas Piggin a écrit :
> >>> On Mon, 1 Oct 2018 12:30:25 +0000 (UTC)
> >>> Christophe Leroy <christophe.leroy@c-s.fr> wrote:
> >>>
> >>>> thread_info is not anymore in the stack, so the entire stack
> >>>> can now be used.
> >>>
> >>> Nice.
> >>>
> >>>>
> >>>> In the meantime, all pointers to the stacks are not anymore
> >>>> pointers to thread_info so this patch changes them to void*
> >>>
> >>> Wasn't this previously effectively already the case with patch
> >>> 3/7? You had thread_info sized space left there, but it was not
> >>> used or initialized right? Does it make sense to move this part
> >>> of it to the previous patch?
> >>
> >> Not really.
> >>
> >> In 3/7 I changed the prototypes of two functions that really used the
> >> pointer as a task pointer only.
>
> I meant 2/7 here sorry.
>
> >>
> >> Here it change things that before 4/7 were really used as both stack
> >> pointers and thread_info pointers.
>
> And here I meant 3/7
>
> >
> > What uses it as a thread_info pointer? It seems more like a stack
> > with some amount of unused space in it but that's all.
>
> Before 3/7, we have
>
> void do_softirq_own_stack(void)
> {
> struct thread_info *curtp, *irqtp;
>
> curtp = current_thread_info();
> irqtp = softirq_ctx[smp_processor_id()];
> irqtp->task = curtp->task;
> irqtp->flags = 0;
> call_do_softirq(irqtp);
> irqtp->task = NULL;
>
> /* Set any flag that may have been set on the
> * alternate stack
> */
> if (irqtp->flags)
> set_bits(irqtp->flags, &curtp->flags);
> }
>
> After 3/7, we have
>
> void do_softirq_own_stack(void)
> {
> struct thread_info *irqtp;
>
> irqtp = softirq_ctx[smp_processor_id()];
> call_do_softirq(irqtp);
> }
>
>
> So now only we can change irqtp to void* can't we ?
In patch 3 we can, right? That's what I mean by moving from
thread_info * to void * in patch 3 rather than 4.
But if you prefer not to, it's fine. Maybe it keeps patch 3
a little smaller.
Thanks,
Nick
next prev parent reply other threads:[~2018-10-03 7:07 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-01 12:30 [RFC PATCH v3 0/7] powerpc: Switch to CONFIG_THREAD_INFO_IN_TASK Christophe Leroy
2018-10-01 12:30 ` [RFC PATCH v3 1/7] book3s/64: avoid circular header inclusion in mmu-hash.h Christophe Leroy
2018-10-03 4:24 ` Nicholas Piggin
2018-10-04 8:20 ` Christophe LEROY
2018-10-04 8:23 ` Aneesh Kumar K.V
2018-10-04 8:32 ` Christophe LEROY
2018-10-01 12:30 ` [RFC PATCH v3 2/7] powerpc: Prepare for moving thread_info into task_struct Christophe Leroy
2018-10-03 5:02 ` Nicholas Piggin
2018-10-03 5:49 ` Christophe LEROY
2018-10-03 5:57 ` Nicholas Piggin
2018-10-04 14:29 ` Christophe LEROY
2018-10-01 12:30 ` [RFC PATCH v3 3/7] powerpc: Activate CONFIG_THREAD_INFO_IN_TASK Christophe Leroy
2018-10-03 5:30 ` Nicholas Piggin
2018-10-03 5:47 ` Christophe LEROY
2018-10-03 5:52 ` Nicholas Piggin
2018-10-03 6:04 ` Christophe LEROY
2018-10-03 6:23 ` Nicholas Piggin
2018-10-01 12:30 ` [RFC PATCH v3 4/7] powerpc: regain entire stack space Christophe Leroy
2018-10-03 5:34 ` Nicholas Piggin
2018-10-03 5:52 ` Christophe LEROY
2018-10-03 6:30 ` Nicholas Piggin
2018-10-03 6:45 ` Christophe LEROY
2018-10-03 7:07 ` Nicholas Piggin [this message]
2018-10-03 9:30 ` Christophe LEROY
2018-10-01 12:30 ` [RFC PATCH v3 5/7] powerpc: 'current_set' is now a table of task_struct pointers Christophe Leroy
2018-10-03 5:41 ` Nicholas Piggin
2018-10-03 6:00 ` Christophe LEROY
2018-10-03 6:09 ` Nicholas Piggin
2018-10-01 12:30 ` [RFC PATCH v3 6/7] powerpc/32: Remove CURRENT_THREAD_INFO and rename TI_CPU Christophe Leroy
2018-10-01 12:30 ` [RFC PATCH v3 7/7] powerpc/64: Modify CURRENT_THREAD_INFO() Christophe Leroy
2018-10-03 5:44 ` Nicholas Piggin
2018-10-03 6:01 ` Christophe LEROY
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=20181003170736.34082f4d@roar.ozlabs.ibm.com \
--to=npiggin@gmail.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=christophe.leroy@c-s.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.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 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).