From patchwork Fri Jan 8 02:20:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Kleen X-Patchwork-Id: 564579 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 08AD11402D8 for ; Fri, 8 Jan 2016 13:20:51 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=gRSVal7g; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:in-reply-to; q=dns; s=default; b=MyLi Csd1ofzIbiaX6ITwPR8Nxe3Pg4dJfYiBxu6fnOpo4rxSewB25HI0flPxc1k+3cpV k+bbcYWu+Bl2O7Hrwudcqe2Ps9u0rqGtbcKtd04wLqTyqy0UliM99ipJP9s0BCWN wOhBp4ofz/FEM5emwEZBS//MTxVoDq93GNnrD3U= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:in-reply-to; s=default; bh=eGoKbYHEi1 5zRzDuBwZWcKX4vmM=; b=gRSVal7gqVklrydFY5rN39ybXSyacGGFrX8dgjcANz JvuOeTDX+MdZcKKVlA9cSZVtJwcq8bZORO0EvGxg3/cZ7+Hthxx9upz/4KDr0SiJ Tl7TuBMKIF0675OxA41f8FpTcPj4IKvZ1gzbiI+PxOT4wNAOZz8ut1m8QuN539k3 M= Received: (qmail 56380 invoked by alias); 8 Jan 2016 02:20:43 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 56369 invoked by uid 89); 8 Jan 2016 02:20:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=avoiding, cur X-HELO: one.firstfloor.org Date: Fri, 8 Jan 2016 03:20:37 +0100 From: Andi Kleen To: "Paul E. Murphy" Cc: sid@reserved-bit.com, "libc-alpha@sourceware.org" , Carlos O'Donell , "munroesj@linux.vnet.ibm.com" , Tulio Magno Quites Machado Filho , Andi Kleen Subject: Re: Tunables for 2.23? Message-ID: <20160108022037.GC4698@two.firstfloor.org> References: <568C2AE6.90002@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <568C2AE6.90002@linux.vnet.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) I finally tracked down now why the tunables patchkit disabled elision on x86. The register function always calls the set function with an empty string, and atoi returns 0 for that. That results in all the elision configuration variables being zeroed. With this patch -- avoiding calling set_func for empty strings -- the tunables work as expected for me on x86. -Andi diff --git a/tunables/tunables.c b/tunables/tunables.c index 6e5aaa9..e8a5690 100644 --- a/tunables/tunables.c +++ b/tunables/tunables.c @@ -182,7 +182,7 @@ tunable_register (tunable_id_t id, tunable_setter_t set_func, char **envp) tunable_t *cur = &tunable_list[id]; cur->set = set_func; - if (cur->val != NULL) + if (cur->val != NULL && *cur->val) { set_func (cur->val); cur->initialized = true;