Message ID | 20210527204457.1250196-1-adhemerval.zanella@linaro.org |
---|---|
Headers |
Return-Path: <libc-alpha-bounces@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9C826395C824; Thu, 27 May 2021 20:45:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9C826395C824 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1622148304; bh=tufqeL4My2Tr74nO5SgC0RvCIye5vg1daHzQHlL+ssM=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=opZ/MqhGzeeciZn1/svJBXhUeYmKQGiHZnNYVLha16xD3C9/DpXju1kg/gHWDwaLU FqtTay6P+iXTC780Upp6peo2AoegU49yrAkKaIXzqOFE6MAAixNTw/fSjcQzYbGrXG bdgXIF1Exrfd2pyWD51z5GQKdtFFsQT6BaZGVe8U= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qv1-xf31.google.com (mail-qv1-xf31.google.com [IPv6:2607:f8b0:4864:20::f31]) by sourceware.org (Postfix) with ESMTPS id 85D4E3853819 for <libc-alpha@sourceware.org>; Thu, 27 May 2021 20:45:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 85D4E3853819 Received: by mail-qv1-xf31.google.com with SMTP id k2so833956qvc.5 for <libc-alpha@sourceware.org>; Thu, 27 May 2021 13:45:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=tufqeL4My2Tr74nO5SgC0RvCIye5vg1daHzQHlL+ssM=; b=JTmpuBL6k7dpTbiS6iZaY7AtdGRdU0ND5g8/0IKCY5roLkn5ANmAJaFATJKSnIRia4 jS22V0Syzkd2nWyES2vb0Q3obHbM2yUcnhhJaMA/eN0vdx2iFy6GR3H1opx48xGF2SNB wZk08OAsTufBpWR7SCftX8qQlmkMtFZVCTmK8Q6G1yYUQK4naZrch3U0xDjLtkG7USa7 zzUgKCeWiyddyHwjYRc0MbToqut0qWHIBb3P4SRQ3EK1twgM228c2FxVB3LGvyELitQp RltGHHnAnnvKx6aFix22Cb7BLn2r3YM8u4W5FotEeiIGpEcfu4npGxkXwXoqes9y6Lss DpuQ== X-Gm-Message-State: AOAM532nvfRN51zJvzzpqRnby4h7NyLdv+MhBZIFHdoD1fyqgOOfEezs +wuhZXdc9ucbzohfGTJGatnJ73efdq0VfA== X-Google-Smtp-Source: ABdhPJzyE37cdUefRC11p3NYfqRRssWJOidWZzHLs5iMSdTyDoSJavdg6Ja4DB8wqEyssBPC79A+Ug== X-Received: by 2002:ad4:5613:: with SMTP id ca19mr454724qvb.3.1622148301824; Thu, 27 May 2021 13:45:01 -0700 (PDT) Received: from birita.. ([177.194.37.86]) by smtp.googlemail.com with ESMTPSA id e14sm2058385qkl.1.2021.05.27.13.45.00 for <libc-alpha@sourceware.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 May 2021 13:45:01 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH 0/4] Move libio lock single-thread optimization to generic libc-lock Date: Thu, 27 May 2021 17:44:53 -0300 Message-Id: <20210527204457.1250196-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, 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 <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Adhemerval Zanella <adhemerval.zanella@linaro.org> Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces@sourceware.org> |
Series |
Move libio lock single-thread optimization to generic libc-lock
|
|
Message
Adhemerval Zanella
May 27, 2021, 8:44 p.m. UTC
This patchset removes some old unused code (_IO_lock_inexpensive and _IO_MTSAFE_IO), consolidate the stdio-lock.h and move the single-thread lock optimization to generic code instead of per-function usage. Adhemerval Zanella (4): libio: Assume _IO_lock_inexpensive libio: Assume _IO_MTSAFE_IO Consolidate stdio-lock.h Move libio lock single-thread optimization to generic libc-lock (BZ #27842) Makeconfig | 2 - debug/Makefile | 43 +++++------- grp/Makefile | 4 +- gshadow/Makefile | 4 +- htl/Makefile | 2 - hurd/vpprintf.c | 4 -- include/stdio.h | 2 +- libio/Makefile | 2 - libio/Versions | 3 - libio/clearerr.c | 4 -- libio/feof.c | 7 -- libio/ferror.c | 9 +-- libio/fileno.c | 2 +- libio/fputc.c | 7 -- libio/genops.c | 66 ------------------- libio/getc.c | 8 --- libio/getchar.c | 7 -- libio/iofdopen.c | 4 -- libio/iofflush.c | 7 -- libio/iofgets.c | 7 -- libio/iofopen.c | 4 -- libio/iofopncook.c | 6 -- libio/iofputs.c | 7 -- libio/iofread.c | 6 -- libio/iofwrite.c | 6 +- libio/iopopen.c | 14 ---- libio/ioungetc.c | 2 - libio/iovdprintf.c | 2 - libio/iovsprintf.c | 2 - libio/libio.h | 37 +++-------- libio/libioP.h | 30 ++------- libio/memstream.c | 7 -- libio/obprintf.c | 2 - libio/oldiofdopen.c | 4 -- libio/oldiofopen.c | 4 -- libio/oldiopopen.c | 14 ---- libio/oldstdfiles.c | 6 -- libio/putc.c | 7 -- libio/putchar.c | 5 -- libio/stdfiles.c | 11 +--- libio/vasprintf.c | 2 - libio/vsnprintf.c | 2 - libio/vswprintf.c | 2 - libio/wgenops.c | 2 - libio/wmemstream.c | 7 -- nptl/Makefile | 3 - nptl/pthread_create.c | 3 - pwd/Makefile | 1 - shadow/Makefile | 4 +- stdio-common/Makefile | 2 - stdio-common/flockfile.c | 1 - stdio-common/vfprintf-internal.c | 4 -- stdlib/Makefile | 9 --- stdlib/strfmon_l.c | 2 - stdlib/strfrom-skeleton.c | 2 - sysdeps/generic/stdio-lock.h | 19 +++--- sysdeps/htl/stdio-lock.h | 57 ---------------- sysdeps/ieee754/float128/Makefile | 4 -- sysdeps/mach/libc-lock.h | 12 ++-- sysdeps/nptl/libc-lock.h | 9 +-- sysdeps/nptl/stdio-lock.h | 104 ------------------------------ sysdeps/unix/sysv/linux/Makefile | 1 - wcsmbs/Makefile | 2 - 63 files changed, 58 insertions(+), 566 deletions(-) delete mode 100644 sysdeps/htl/stdio-lock.h delete mode 100644 sysdeps/nptl/stdio-lock.h
Comments
* Adhemerval Zanella via Libc-alpha: > This patchset removes some old unused code (_IO_lock_inexpensive > and _IO_MTSAFE_IO), consolidate the stdio-lock.h and move the > single-thread lock optimization to generic code instead of > per-function usage. > > Adhemerval Zanella (4): > libio: Assume _IO_lock_inexpensive > libio: Assume _IO_MTSAFE_IO > Consolidate stdio-lock.h > Move libio lock single-thread optimization to generic libc-lock (BZ > #27842) This series is still assigned to me in Patchwork. Is it still active? Thanks, Florian
On 12/04/2022 09:18, Florian Weimer wrote: > * Adhemerval Zanella via Libc-alpha: > >> This patchset removes some old unused code (_IO_lock_inexpensive >> and _IO_MTSAFE_IO), consolidate the stdio-lock.h and move the >> single-thread lock optimization to generic code instead of >> per-function usage. >> >> Adhemerval Zanella (4): >> libio: Assume _IO_lock_inexpensive >> libio: Assume _IO_MTSAFE_IO >> Consolidate stdio-lock.h >> Move libio lock single-thread optimization to generic libc-lock (BZ >> #27842) > > This series is still assigned to me in Patchwork. Is it still active? I think it would be a good micro-optimization and a code consolidation, although I am not sure if it still applies. If you think it would be a good addition I can work on rebase and send a new version.
* Adhemerval Zanella: > On 12/04/2022 09:18, Florian Weimer wrote: >> * Adhemerval Zanella via Libc-alpha: >> >>> This patchset removes some old unused code (_IO_lock_inexpensive >>> and _IO_MTSAFE_IO), consolidate the stdio-lock.h and move the >>> single-thread lock optimization to generic code instead of >>> per-function usage. >>> >>> Adhemerval Zanella (4): >>> libio: Assume _IO_lock_inexpensive >>> libio: Assume _IO_MTSAFE_IO >>> Consolidate stdio-lock.h >>> Move libio lock single-thread optimization to generic libc-lock (BZ >>> #27842) >> >> This series is still assigned to me in Patchwork. Is it still active? > > I think it would be a good micro-optimization and a code consolidation, > although I am not sure if it still applies. If you think it would be > a good addition I can work on rebase and send a new version. I'm interested in the _IO_MTSAFE_IO consolidation, but the rest looks useful as well. I think we have some places where we define stdio locking macros differently for no apparent reason, that that's just waiting to cause trouble. Thanks, Florian