From: Carlos O'Donell <carlos@redhat.com>
To: Florian Weimer <fweimer@redhat.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH 11/13] nptl: Simplify resetting the in-flight stack in __reclaim_stacks
Date: Sun, 9 May 2021 17:42:01 -0400 [thread overview]
Message-ID: <98e931ee-fa42-452d-171a-9a1b9b0be5a2@redhat.com> (raw)
In-Reply-To: <ca4a63acda644d583ed3769e4d1f4f833fb3ce5d.1620323953.git.fweimer@redhat.com>
On 5/6/21 2:11 PM, Florian Weimer via Libc-alpha wrote:
> stack_list_del overwrites the in-flight stack variable.
LGTM. Hard to tell if I want to call this is a bug fix or a cleanup
that just happens naturally as part of the refactoring :-)
Tested on x86_64 and i686 without regression.
Tested-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
> ---
> nptl/allocatestack.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c
> index 12cd1058d4..076cffd35b 100644
> --- a/nptl/allocatestack.c
> +++ b/nptl/allocatestack.c
> @@ -799,6 +799,8 @@ __reclaim_stacks (void)
> elem->next->prev = elem->prev;
> elem->prev->next = elem->next;
> }
> +
> + GL (dl_in_flight_stack) = 0;
> }
>
> /* Mark all stacks except the still running one as free. */
> @@ -842,7 +844,7 @@ __reclaim_stacks (void)
> /* Remove the entry for the current thread to from the cache list
> and add it to the list of running threads. Which of the two
> lists is decided by the user_stack flag. */
> - stack_list_del (&self->list);
> + list_del (&self->list);
>
> /* Re-initialize the lists for all the threads. */
> INIT_LIST_HEAD (&GL (dl_stack_used));
> @@ -856,8 +858,6 @@ __reclaim_stacks (void)
> /* There is one thread running. */
> __nptl_nthreads = 1;
>
> - GL (dl_in_flight_stack) = 0;
> -
> /* Initialize locks. */
> GL (dl_stack_cache_lock) = LLL_LOCK_INITIALIZER;
> __default_pthread_attr_lock = LLL_LOCK_INITIALIZER;
>
--
Cheers,
Carlos.
next prev parent reply other threads:[~2021-05-09 21:42 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-06 18:08 [PATCH 00/13] Linux: Move most stack management out of libpthread Florian Weimer
2021-05-06 18:08 ` [PATCH 01/13] scripts/versions.awk: Add strings and hashes to <first-versions.h> Florian Weimer
2021-05-09 21:42 ` Carlos O'Donell
2021-05-06 18:09 ` [PATCH v2 02/13] elf, nptl: Resolve recursive lock implementation early Florian Weimer
2021-05-09 21:42 ` Carlos O'Donell
2021-05-10 5:54 ` Florian Weimer
2021-05-06 18:10 ` [PATCH 03/13] nptl: Export __libc_multiple_threads from libc as an internal symbol Florian Weimer
2021-05-09 21:42 ` Carlos O'Donell
2021-05-06 18:10 ` [PATCH 04/13] Linux: Explicitly disable cancellation checking in the dynamic loader Florian Weimer
2021-05-09 21:42 ` Carlos O'Donell
2021-05-06 18:10 ` [PATCH 05/13] Linux: Simplify and fix the definition of SINGLE_THREAD_P Florian Weimer
2021-05-09 21:42 ` Carlos O'Donell
2021-05-06 18:10 ` [PATCH 06/13] nptl: Eliminate __pthread_multiple_threads Florian Weimer
2021-05-09 21:42 ` Carlos O'Donell
2021-05-06 18:10 ` [PATCH 07/13] elf: Introduce __tls_pre_init_tp Florian Weimer
2021-05-09 21:42 ` Carlos O'Donell
2021-05-06 18:10 ` [PATCH 08/13] nptl: Move more stack management variables into _rtld_global Florian Weimer
2021-05-09 21:42 ` Carlos O'Donell
2021-05-06 18:11 ` [PATCH 09/13] nptl: Simplify the change_stack_perm calling convention Florian Weimer
2021-05-09 21:42 ` Carlos O'Donell
2021-05-06 18:11 ` [PATCH 10/13] nptl: Move changing of stack permissions into ld.so Florian Weimer
2021-05-09 21:42 ` Carlos O'Donell
2021-05-06 18:11 ` [PATCH 11/13] nptl: Simplify resetting the in-flight stack in __reclaim_stacks Florian Weimer
2021-05-09 21:42 ` Carlos O'Donell [this message]
2021-05-06 18:11 ` [PATCH 12/13] nptl: Move __default_pthread_attr, __default_pthread_attr_lock into libc Florian Weimer
2021-05-09 21:41 ` Carlos O'Donell
2021-05-09 21:42 ` Carlos O'Donell
2021-05-06 18:11 ` [PATCH 13/13] Linux: Move __reclaim_stacks into the fork implementation in libc Florian Weimer
2021-05-09 21:41 ` Carlos O'Donell
2021-05-09 21:42 ` [PATCH 00/13] Linux: Move most stack management out of libpthread Carlos O'Donell
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=98e931ee-fa42-452d-171a-9a1b9b0be5a2@redhat.com \
--to=carlos@redhat.com \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).