From owner-svn-src-head@freebsd.org Sun Nov 19 15:40:30 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C87F4D94F93 for ; Sun, 19 Nov 2017 15:40:30 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from sonic313-24.consmr.mail.ne1.yahoo.com (sonic313-24.consmr.mail.ne1.yahoo.com [66.163.185.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9827F7CD7A for ; Sun, 19 Nov 2017 15:40:30 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1511106029; bh=gCqw5J3CwwGg3tOmT3faTondRnukpL9pbOfd/uiFnus=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=EC/kQhiYYhvvfjraCql++MCIG0fKS+KGF+M3h3G5OrVlZIn9lFwtbym6t8axuoWIj554Ih39vynyBiAP3cUvZ83jeOEAw112kCJ4aOMrHnpuMusUjXz5aFN5ADbhQDQDAh4gIBPEnShf32l2pwv9dr+M7CDZFk23QoogANHHuDEU5oK4Ga0MZp5tNnpDr/iAQrR0wUi0eBPOBn+O1+U9UFV6EKNExCTLe0iqB7suHSonP4ZjEEvGS+hZQFroU0xFrUdCE3w69BgSEZLdwqDwKF2eRUhvGNfQobvq8l+Z/QMoDn1EevnJQWvuStRwR3aw1mclBW0lH9YW2wXQ8N2M+A== X-YMail-OSG: dDDqrwMVM1lPkwZXulRB9koN8H.TiwxbN71COUb_t74.SnXkUKpqreGlXW8UjKn ChxgGXEwFSeDWj2yHnYKoCqWJRyz_O8tIc.k4rnVdYpVOaHQfpY92kLjZNEw0tPXngPaXadqzNrM 10gAFaHBIWCusRIFkVzDeuwDJf4_ximQlxt9eqdKNj1nS2Ea8a0MZRMeRPjxw1YP6iE1eTly4U3X nH.ISFvCWJxVKFfIrNxky5sBy4gqQ6VG05uSl7XhyjHpAqAfROUuMd.hbzZyHupLeTHV8VbNyGiS z_i3_coulOnvjr5bFGsXsxWH1Bu7A9nsJY1WVbny2geGYa0OIzzcBjO9iwZsxvW9O.7KBI8_BaCb 7DezgJdMHsmON5Ut2iOTYkeJ1yeVnvShawykPu6gSHLB7YX8LQDrGsTgS_u9tWTmJDJFwGaOFl_e s7BGopSZEJUaelcbfUnuPcGn80eWX3RFj8DfUPYpoZ67l7tNIwE8ONawtypcLhe1o9WlgNWhmTby V5JqIvQ1cf6QevUNDEQTwh70x3jGBZFVYhPpNK2eA Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ne1.yahoo.com with HTTP; Sun, 19 Nov 2017 15:40:29 +0000 Received: from [127.0.0.1] by smtp202.mail.ne1.yahoo.com with NNFMP; 19 Nov 2017 15:40:25 -0000 X-Yahoo-Newman-Id: 474714.97390.bm@smtp202.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: dDDqrwMVM1lPkwZXulRB9koN8H.TiwxbN71COUb_t74.SnX kUKpqreGlXW8UjKnChxgGXEwFSeDWj2yHnYKoCqWJRyz_O8tIc.k4rnVdYpV OaHQfpY92kLjZNEw0tPXngPaXadqzNrM10gAFaHBIWCusRIFkVzDeuwDJf4_ ximQlxt9eqdKNj1nS2Ea8a0MZRMeRPjxw1YP6iE1eTly4U3XnH.ISFvCWJxV KFfIrNxky5sBy4gqQ6VG05uSl7XhyjHpAqAfROUuMd.hbzZyHupLeTHV8VbN yGiSz_i3_coulOnvjr5bFGsXsxWH1Bu7A9nsJY1WVbny2geGYa0OIzzcBjO9 iwZsxvW9O.7KBI8_BaCb7DezgJdMHsmON5Ut2iOTYkeJ1yeVnvShawykPu6g SHLB7YX8LQDrGsTgS_u9tWTmJDJFwGaOFl_es7BGopSZEJUaelcbfUnuPcGn 80eWX3RFj8DfUPYpoZ67l7tNIwE8ONawtypcLhe1o9WlgNWhmTbyV5JqIvQ1 cf6QevUNDEQTwh70x3jGBZFVYhPpNK2eA X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r325965 - head/libexec/rtld-elf To: trasz@FreeBSD.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201711181321.vAIDLM6S028725@repo.freebsd.org> <20171118141007.GI2272@kib.kiev.ua> <20171119121245.GA88868@brick> From: Pedro Giffuni Message-ID: Date: Sun, 19 Nov 2017 10:40:24 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171119121245.GA88868@brick> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Nov 2017 15:40:30 -0000 On 11/19/17 07:12, Edward Tomasz Napierala wrote: > On 1118T1610, Konstantin Belousov wrote: >> On Sat, Nov 18, 2017 at 01:21:22PM +0000, Edward Tomasz Napierala wrote: >>> Author: trasz >>> Date: Sat Nov 18 13:21:22 2017 >>> New Revision: 325965 >>> URL: https://svnweb.freebsd.org/changeset/base/325965 >>> >>> Log: >>> Increase rtld initial memory pool size from 32kB to 128kB. >>> >>> The old value was probably fine back in 1998, when that code was imported >>> (although the comments still mention VAX, which was quite obsolete by then); >>> now, however, it's too small to handle our libc, which results in some >>> additional calls to munmap/mmap later on. Asking for more virtual address >>> space is virtually free, and syscalls are not, thus the change. >>> >>> It was suggested by kib@ that this might be a symptom of a deeper problem. >>> It doesn't only affect libc, though - the change also improves rtld memory >>> management for eg KDE libraries. I guess it's just a natural bloat. >> This is not what I said. >> >> My guess was that the large allocation you see in the ktrace output as >> coming from rtld was really an allocation of the TLS segment, and it was >> so large because libc has that large TLS segment. You did not checked this >> guess against the actual code. > Right, I stand corrected. > >> If my guess is true, I do not see a point in the change you made: the >> memory consumption is externally imposed on rtld, and we should not try >> to tailor it to single, whenever important, consumer. > Here's where I disagree. The rtld is not some abstract concept, it's one > of the components of the operating system, and it can and should be tweaked > to match real life situations. Especially when it affects virtually all > of its use cases, as is the case with libc. > > Being pragmatic ... Determining such values is almost always a trial-and-error process. Perhaps 64k is makes everyone (especially KDE) happy? Pedro.