From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id B720D1F4B4 for ; Sat, 17 Oct 2020 01:02:14 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 92A973897000; Sat, 17 Oct 2020 01:02:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 92A973897000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1602896532; bh=g0ZY3eK1sT4kojRAGc7wMk6Z/N+jitbY7QT6aHGIv8c=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=XpCH93FN/NB79uKJGLewBuVlvacnZKNa0qxh+AliebYUxYbN30MgzuQHfFEHQYIR9 1rrtgTTCiys6UWMqDONI7nPam/7nea5D9R51Im76+GUz3R31e06wZw73NMkmluCJb6 S7umLLKSGzcCKLQZ3BUFoV/RE/DngTzMoXhcz7O4= Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by sourceware.org (Postfix) with ESMTPS id CCDEF3861887 for ; Sat, 17 Oct 2020 01:02:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CCDEF3861887 Received: by mail-pg1-x530.google.com with SMTP id y14so2399085pgf.12 for ; Fri, 16 Oct 2020 18:02:10 -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=g0ZY3eK1sT4kojRAGc7wMk6Z/N+jitbY7QT6aHGIv8c=; b=EzQl3Uh3zXHt33tWC2EsjIPkpw/OHJk6v9Zk6h5/6TB7pKFgCJu+uRwVnm9T0NOclJ ndWr+6Jza4X68eML6rd8VQfwVeXL7mdXQU0KpQt0EFOh1X/xVtitPhq1ipzHEQ3SE6wE T9540ROORv6CJDYapZ/Sf7wzBNk8LrCTUSRQNIzykqr6q/iE4hHG+9toV8HeT+dPkLAT mKKgRuMLnvlu4N/Qzqwypt2pJNEZXQ42aAyafAamOkNTX9eNWHzHF7Qh1p0Omb/c+p/a 9l99GcR3n3raXUfpF4NKjbfBOdd8QJi1HoX9Gvh2+A4vM5qiFQisbc72qSzuaD2q01jN Apow== X-Gm-Message-State: AOAM531JBZmzmBM1pDtTQ3PAUwF9TQdF0eG6hCNtDC0N01i2OE2IAaNt aqBqcDNSKnxcO/cIX664t5UstNUFjws= X-Google-Smtp-Source: ABdhPJw2cekGGx99ADNpPUxRx64zzVpE0fIR220+74blKylZPbUmw2fLl+cR1hbPyZ9gcFgNIhPdcQ== X-Received: by 2002:a63:1906:: with SMTP id z6mr5461859pgl.286.1602896529916; Fri, 16 Oct 2020 18:02:09 -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 x4sm3925461pfj.114.2020.10.16.18.02.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Oct 2020 18:02:09 -0700 (PDT) Received: from gnu-cfl-2.localdomain (localhost [IPv6:::1]) by gnu-cfl-2.localdomain (Postfix) with ESMTP id E0E4B1A013F; Fri, 16 Oct 2020 18:02:07 -0700 (PDT) To: libc-alpha@sourceware.org Subject: V3 [PATCH 0/2] ld.so: Add --list-tunables to print tunable values Date: Fri, 16 Oct 2020 18:02:05 -0700 Message-Id: <20201017010207.6074-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: , From: "H.J. Lu via Libc-alpha" Reply-To: "H.J. Lu" Cc: Florian Weimer Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Tunable values and their minimum/maximum values are invisible to users. This patch set adds --list-tunables to ld.so to print tunable values with their minimum and maximum values. --list-tunables works on i686 and x86-64. Please test --list-tunables on your native processors. users/hjl/tunable/master branch at: https://gitlab.com/x86-glibc/glibc/-/commits/users/hjl/tunable/master contains the same set of patches. On x86, to make cache info accessible to --list-tunables, they are moved to cpu_features in ld.so and TUNABLE_SET_WITH_BOUNDS is used to update tunable bounds. H.J. Lu (2): x86: Move x86 processor cache info to cpu_features ld.so: Add --list-tunables to print tunable values NEWS | 2 + elf/Makefile | 8 + elf/dl-main.h | 2 +- elf/dl-tunables.c | 36 +++ elf/dl-tunables.h | 2 + elf/dl-usage.c | 7 +- elf/rtld.c | 23 ++ manual/tunables.texi | 37 +++ sysdeps/x86/cacheinfo.c | 46 ++- sysdeps/x86/cacheinfo.h | 384 ++----------------------- sysdeps/x86/cpu-features.c | 35 +-- sysdeps/x86/dl-cacheinfo.h | 446 +++++++++++++++++++++++++++++ sysdeps/x86/include/cpu-features.h | 22 ++ 13 files changed, 652 insertions(+), 398 deletions(-) -- 2.26.2