From patchwork Fri Jul 3 17:52:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 39906 Return-Path: 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 CE051384402F; Fri, 3 Jul 2020 17:52:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CE051384402F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1593798744; bh=Po9smdmu/oZTeb5UwUHaYdPLfg646/mrYXOPo49TOk8=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ZrU2GiceAjTxB9shRiHOAat2AaKxh4e4meSxtHa7yUdwKU0TVJkQgGiA6vK+tb7IR 62csmOKoxnQd6mPgby6JJoYdxGxSTJw6TFrbR0yd4eiVPZFy6Ltm8ROwRrHfmoYqDY GDcGi6KamTgxm7MlDj2XiHHOMNfhZNumFXwmHEMg= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 8C1FB384402F for ; Fri, 3 Jul 2020 17:52:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8C1FB384402F Received: by mail-pl1-x633.google.com with SMTP id s14so12882357plq.6 for ; Fri, 03 Jul 2020 10:52:22 -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:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Po9smdmu/oZTeb5UwUHaYdPLfg646/mrYXOPo49TOk8=; b=UxV/+pIgrBC5NT0YIEWHhXDv46AfCpPiCLvR6dur4+KGvoFP02Oq1Z8n8nCnfTGl3S uGAvvxmQUDa40fMucvRD4GEWANMz72CgOKKZByYaMCS54DpVQskByQlsBp3VKp0Pya5m Wpap2E+wrZ53RxrJE9hienYawcIhHxS6vCG2aEUkqmtsa8t8xY1Ab//qpG37XTMpw9OP avklGyVklcmUlw4uuwvMQ0Hv7TG5K9mC91z8OCHDXQuSsVRW4cL0virYeZTLjUcclG+J RbWS8NJ6FNBhcHE38Iz/fqTcyw90wUwH6fH+5N6JCE4q1zNIjBEXUhFQzJrwfXnDH8OO BzwA== X-Gm-Message-State: AOAM531lyhrtGeKHj3eazDA1Q3C0YoHy1Jyz9x95BqfOgeGNyLnHY7va q1+6xb0c5Eor91BARLgzAvM= X-Google-Smtp-Source: ABdhPJwr+2os5re9tBSN/zPv45eQwl4BlIFlp5zYkAA+cGh0/AJ2aCtR8gnyLulz+/hRlh7dT5Y/6Q== X-Received: by 2002:a17:902:8b86:: with SMTP id ay6mr31129989plb.329.1593798741740; Fri, 03 Jul 2020 10:52:21 -0700 (PDT) Received: from gnu-cfl-2.localdomain (c-69-181-90-243.hsd1.ca.comcast.net. [69.181.90.243]) by smtp.gmail.com with ESMTPSA id w3sm12092979pff.56.2020.07.03.10.52.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jul 2020 10:52:21 -0700 (PDT) Received: from gnu-cfl-2.localdomain (localhost [IPv6:::1]) by gnu-cfl-2.localdomain (Postfix) with ESMTP id 489691A00D6; Fri, 3 Jul 2020 10:52:20 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH 0/2] x86: Add thresholds for "rep movsb/stosb" to tunables Date: Fri, 3 Jul 2020 10:52:18 -0700 Message-Id: <20200703175220.1178840-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "H.J. Lu via Libc-alpha" From: "H.J. Lu" Reply-To: "H.J. Lu" Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" 1. Add __tunable_update_val to update tunable min/max values and move x86 processor cache info to cpu_features. 2. Add x86_rep_movsb_threshold and x86_rep_stosb_threshold to tunables to update thresholds for "rep movsb" and "rep stosb" at run-time. H.J. Lu (2): Update tunable min/max values x86: Add thresholds for "rep movsb/stosb" to tunables elf/dl-tunables.c | 51 +- elf/dl-tunables.h | 15 + manual/tunables.texi | 14 + sysdeps/i386/cacheinfo.c | 3 - sysdeps/x86/Makefile | 2 +- sysdeps/x86/cacheinfo.c | 870 ++-------------- sysdeps/x86/cpu-features.c | 19 +- sysdeps/x86/cpu-features.h | 30 + sysdeps/x86/dl-cacheinfo.c | 926 ++++++++++++++++++ sysdeps/x86/dl-tunables.list | 6 + sysdeps/x86/init-arch.h | 3 + .../multiarch/memmove-vec-unaligned-erms.S | 16 +- .../multiarch/memset-vec-unaligned-erms.S | 12 +- 13 files changed, 1107 insertions(+), 860 deletions(-) delete mode 100644 sysdeps/i386/cacheinfo.c create mode 100644 sysdeps/x86/dl-cacheinfo.c