From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by sourceware.org (Postfix) with ESMTP id 3D4C2383E806 for ; Wed, 20 May 2020 13:11:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3D4C2383E806 Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-408-3ugr0ZBHM9mx-0gVdHQ0Eg-1; Wed, 20 May 2020 09:11:28 -0400 X-MC-Unique: 3ugr0ZBHM9mx-0gVdHQ0Eg-1 Received: by mail-qv1-f69.google.com with SMTP id m9so3476041qvl.18 for ; Wed, 20 May 2020 06:11:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=6p6qKFxLA0LjbI40YnMYJyaEi65r9tXbCH4CC9wlwhw=; b=fryhGvoFcAuYAbZfpTMWiGotZ4hi3A+qh4sQ26aIpgoViRdxl+D8gOlZSX0EG9DJoT kMtCIQaOXDQB3oyH0XkjYEMjKDY4Mvc1pfAGcRPe+n2Wr54IIL4dSNy6FhmwIMDWQ3lt +Fqk04a8/NOZSMJiJskNJVLaKu/HO7yKJpiQmOgv3TjuNhjkCqfWi6DfKiHEA95a9AP8 kAYNHXkcnkukOTm4ClTLaA8kS301ZMylappCOhlCRB8avjKLRcRHD5kOpdRh9VN41+NF S/ccg/nAxK1rEPQRArIfTSCA3ZzoTAYKHIzaOx76F7G1v0LtQ6+DIxZsyIcWk4dVBNh7 oJOg== X-Gm-Message-State: AOAM531sAKpjJf1nBJGLM+KpUIJKuSsBoYvTMBInXK40RSnhGeqEwJov yy3iKeEUiyW60dNzNHH7q8/EOxNdWWMGucKjRwk12CKV3DJwv1XeUUk/taNGELd6ONhHPe61Kjh dF64Rdrjn2Z5CrTxI2FBT X-Received: by 2002:ac8:1aab:: with SMTP id x40mr5180670qtj.358.1589980287448; Wed, 20 May 2020 06:11:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZ2OXz6yu2Yj9W5N3tROUbNprAUsAKNNngymVR7HHXx7eNteY2ppZM3l+fLmiRrvdE6LvzYg== X-Received: by 2002:ac8:1aab:: with SMTP id x40mr5180638qtj.358.1589980287125; Wed, 20 May 2020 06:11:27 -0700 (PDT) Received: from [192.168.1.4] (198-84-170-103.cpe.teksavvy.com. [198.84.170.103]) by smtp.gmail.com with ESMTPSA id g26sm2407172qtk.76.2020.05.20.06.11.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 20 May 2020 06:11:25 -0700 (PDT) Subject: Re: [PATCH 00/19] Signal mask for timer helper thread To: Florian Weimer , libc-alpha@sourceware.org References: From: Carlos O'Donell Organization: Red Hat Message-ID: <0106e231-119b-3b1a-de80-f3a31f0195b0@redhat.com> Date: Wed, 20 May 2020 09:11:24 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2020 13:11:35 -0000 On 5/19/20 6:43 AM, Florian Weimer via Libc-alpha wrote: > This series cleans up various aspects of NPTL and eventually adds > functionality to explicitly block internal signals on new threads. Great! I think that's a useful feature when integrated into the attributes for the thread. > There is now a proper public interface (for non-internal signals) and > the awkward separate sigset_t * argument and a pthread_create variant is > no longer needed. Sounds great... but this patch set has gotten much bigger! :-) > To avoid creating new symbols in libpthread, some dependent > functionality had to be moved into libc. Since more parts of > pthread_attr_t are now dynamically allocated, it seemed prudent to > consolidate the copying of thread attributes. Agreed. > Tested on x86_64-linux-gnu, i686-linux-gnu. Built with > build-many-glibcs.py (also various intermediate steps). Testing in progress for x86_64 and i686 on my side. I'll start reviewing some of the easy patches. > Thanks, > Florian > > Florian Weimer (19): > manual: Add missing section and node for clockid_t wait functions > nptl: Replace some stubs with the Linux implementation > nptl: Move pthread_attr_setaffinity_np into libc > nptl: Move pthread_getaffinity_np into libc > nptl: Move pthread_gettattr_np into libc > nptl: Make __pthread_attr_init, __pthread_attr_destroy available > internally > nptl: Add __pthread_attr_copy for copying pthread_attr_t objects > nptl: Use __pthread_attr_copy in pthread_getattr_default_np (bug > 25999) > nptl: Use __pthread_attr_copy in pthread_setattr_default_np > : Add libpthread hidden alias support > nptl: Add internal alias __pthread_getattr_default_np > nptl: Use __pthread_getattr_default_np in pthread_create > nptl: Use __pthread_attr_setaffinity_np in pthread_getattr_np > nptl: Change type of __default_pthread_attr > nptl: Destroy the default thread attribute as part of freeres > nptl: Make pthread_attr_t dynamically extensible > nptl: Add pthread_attr_setsigmask_np, pthread_attr_getsigmask_np > manual: Add pthread_attr_setsigmask_np, pthread_attr_getsigmask_np > Linux: Use __pthread_attr_setsigmask_internal for timer helper thread > > NEWS | 4 + > include/libc-symbols.h | 23 ++ > manual/threads.texi | 55 +++++ > nptl/Makefile | 24 ++- > nptl/Versions | 29 ++- > nptl/allocatestack.c | 2 +- > nptl/libpthread-compat.c | 5 + > nptl/nptl-init.c | 4 +- > nptl/nptlfreeres.c | 1 + > nptl/pthreadP.h | 35 ++- > nptl/pthread_attr_copy.c | 64 ++++++ > nptl/pthread_attr_destroy.c | 15 +- > nptl/pthread_attr_extension.c | 32 +++ > nptl/pthread_attr_getaffinity.c | 14 +- > nptl/pthread_attr_getsigmask.c | 38 ++++ > nptl/pthread_attr_getstacksize.c | 2 +- > nptl/pthread_attr_init.c | 5 +- > nptl/pthread_attr_setaffinity.c | 45 ++-- > nptl/pthread_attr_setsigmask.c | 34 +++ > nptl/pthread_attr_setsigmask_internal.c | 45 ++++ > nptl/pthread_create.c | 63 +++--- > nptl/pthread_getaffinity.c | 45 +++- > nptl/pthread_getattr_default_np.c | 15 +- > nptl/pthread_getattr_np.c | 43 ++-- > nptl/pthread_getname.c | 49 ++++- > nptl/pthread_setaffinity.c | 37 +++- > nptl/pthread_setattr_default_np.c | 63 +++--- > nptl/pthread_setname.c | 43 +++- > nptl/tst-pthread-attr-sigmask.c | 204 ++++++++++++++++++ > nptl/tst-pthread-defaultattr-free.c | 78 +++++++ > .../unix/sysv/linux => nptl}/tst-setgetname.c | 0 > .../tst-thread-affinity-pthread.c | 0 > .../tst-thread-affinity-pthread2.c | 0 > .../tst-thread-affinity-sched.c | 0 > nptl/vars.c | 2 +- > sysdeps/nptl/internaltypes.h | 26 ++- > sysdeps/nptl/pthread.h | 15 ++ > sysdeps/unix/sysv/linux/Makefile | 5 +- > sysdeps/unix/sysv/linux/aarch64/libc.abilist | 8 + > .../sysv/linux/aarch64/libpthread.abilist | 3 - > sysdeps/unix/sysv/linux/alpha/libc.abilist | 10 + > .../unix/sysv/linux/alpha/libpthread.abilist | 6 +- > sysdeps/unix/sysv/linux/arm/be/libc.abilist | 8 + > .../unix/sysv/linux/arm/be/libpthread.abilist | 3 - > sysdeps/unix/sysv/linux/arm/le/libc.abilist | 8 + > .../unix/sysv/linux/arm/le/libpthread.abilist | 3 - > sysdeps/unix/sysv/linux/createthread.c | 9 +- > sysdeps/unix/sysv/linux/csky/libc.abilist | 8 + > .../unix/sysv/linux/csky/libpthread.abilist | 3 - > sysdeps/unix/sysv/linux/hppa/libc.abilist | 10 + > .../unix/sysv/linux/hppa/libpthread.abilist | 6 +- > sysdeps/unix/sysv/linux/i386/libc.abilist | 10 + > .../unix/sysv/linux/i386/libpthread.abilist | 6 +- > sysdeps/unix/sysv/linux/ia64/libc.abilist | 10 + > .../unix/sysv/linux/ia64/libpthread.abilist | 6 +- > .../sysv/linux/m68k/coldfire/libc.abilist | 8 + > .../linux/m68k/coldfire/libpthread.abilist | 3 - > .../unix/sysv/linux/m68k/m680x0/libc.abilist | 10 + > .../sysv/linux/m68k/m680x0/libpthread.abilist | 6 +- > .../sysv/linux/microblaze/be/libc.abilist | 8 + > .../linux/microblaze/be/libpthread.abilist | 3 - > .../sysv/linux/microblaze/le/libc.abilist | 8 + > .../linux/microblaze/le/libpthread.abilist | 3 - > .../sysv/linux/mips/mips32/fpu/libc.abilist | 10 + > .../sysv/linux/mips/mips32/libpthread.abilist | 6 +- > .../sysv/linux/mips/mips32/nofpu/libc.abilist | 10 + > .../sysv/linux/mips/mips64/libpthread.abilist | 6 +- > .../sysv/linux/mips/mips64/n32/libc.abilist | 10 + > .../sysv/linux/mips/mips64/n64/libc.abilist | 10 + > sysdeps/unix/sysv/linux/nios2/libc.abilist | 8 + > .../unix/sysv/linux/nios2/libpthread.abilist | 3 - > .../linux/powerpc/powerpc32/fpu/libc.abilist | 10 + > .../powerpc/powerpc32/libpthread.abilist | 6 +- > .../powerpc/powerpc32/nofpu/libc.abilist | 10 + > .../linux/powerpc/powerpc64/be/libc.abilist | 10 + > .../powerpc/powerpc64/be/libpthread.abilist | 5 - > .../linux/powerpc/powerpc64/le/libc.abilist | 8 + > .../powerpc/powerpc64/le/libpthread.abilist | 3 - > sysdeps/unix/sysv/linux/pthread_getaffinity.c | 58 ----- > sysdeps/unix/sysv/linux/pthread_getname.c | 69 ------ > sysdeps/unix/sysv/linux/pthread_setaffinity.c | 53 ----- > sysdeps/unix/sysv/linux/pthread_setname.c | 63 ------ > .../unix/sysv/linux/riscv/rv64/libc.abilist | 8 + > .../sysv/linux/riscv/rv64/libpthread.abilist | 3 - > .../unix/sysv/linux/s390/s390-32/libc.abilist | 10 + > .../linux/s390/s390-32/libpthread.abilist | 6 +- > .../unix/sysv/linux/s390/s390-64/libc.abilist | 10 + > .../linux/s390/s390-64/libpthread.abilist | 6 +- > sysdeps/unix/sysv/linux/sh/be/libc.abilist | 10 + > .../unix/sysv/linux/sh/be/libpthread.abilist | 6 +- > sysdeps/unix/sysv/linux/sh/le/libc.abilist | 10 + > .../unix/sysv/linux/sh/le/libpthread.abilist | 6 +- > .../sysv/linux/sparc/sparc32/libc.abilist | 10 + > .../linux/sparc/sparc32/libpthread.abilist | 6 +- > .../sysv/linux/sparc/sparc64/libc.abilist | 10 + > .../linux/sparc/sparc64/libpthread.abilist | 6 +- > sysdeps/unix/sysv/linux/timer_routines.c | 19 +- > .../unix/sysv/linux/x86_64/64/libc.abilist | 10 + > .../sysv/linux/x86_64/64/libpthread.abilist | 5 - > .../unix/sysv/linux/x86_64/x32/libc.abilist | 8 + > .../sysv/linux/x86_64/x32/libpthread.abilist | 3 - > 101 files changed, 1289 insertions(+), 551 deletions(-) > create mode 100644 nptl/pthread_attr_copy.c > create mode 100644 nptl/pthread_attr_extension.c > create mode 100644 nptl/pthread_attr_getsigmask.c > create mode 100644 nptl/pthread_attr_setsigmask.c > create mode 100644 nptl/pthread_attr_setsigmask_internal.c > create mode 100644 nptl/tst-pthread-attr-sigmask.c > create mode 100644 nptl/tst-pthread-defaultattr-free.c > rename {sysdeps/unix/sysv/linux => nptl}/tst-setgetname.c (100%) > rename {sysdeps/unix/sysv/linux => nptl}/tst-thread-affinity-pthread.c (100%) > rename {sysdeps/unix/sysv/linux => nptl}/tst-thread-affinity-pthread2.c (100%) > rename {sysdeps/unix/sysv/linux => nptl}/tst-thread-affinity-sched.c (100%) > delete mode 100644 sysdeps/unix/sysv/linux/pthread_getaffinity.c > delete mode 100644 sysdeps/unix/sysv/linux/pthread_getname.c > delete mode 100644 sysdeps/unix/sysv/linux/pthread_setaffinity.c > delete mode 100644 sysdeps/unix/sysv/linux/pthread_setname.c > -- Cheers, Carlos.