From owner-svn-src-all@freebsd.org Mon Jan 1 22:54:20 2018 Return-Path: Delivered-To: svn-src-all@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 074DCE89774; Mon, 1 Jan 2018 22:54:20 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mailout.stack.nl (mailout05.stack.nl [131.155.140.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.stack.nl", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B880827D8; Mon, 1 Jan 2018 22:54:18 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from toad2.stack.nl (toad2.stack.nl [IPv6:2001:610:1108:5010::161]) by mailout.stack.nl (Postfix) with ESMTP id 0A3EA35; Mon, 1 Jan 2018 23:54:09 +0100 (CET) Received: by toad2.stack.nl (Postfix, from userid 1677) id F2544892CC; Mon, 1 Jan 2018 23:54:08 +0100 (CET) Date: Mon, 1 Jan 2018 23:54:08 +0100 From: Jilles Tjoelker To: Antoine Brodin Cc: Mateusz Guzik , David Chisnall , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325726 - head/sys/kern Message-ID: <20180101225408.GA78160@stack.nl> References: <201711112239.vABMdXS2053880@repo.freebsd.org> <20171228162525.GA32705@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171228162525.GA32705@stack.nl> User-Agent: Mutt/1.8.0 (2017-02-23) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 22:54:20 -0000 On Thu, Dec 28, 2017 at 05:25:25PM +0100, Jilles Tjoelker wrote: > On Thu, Dec 28, 2017 at 12:40:31PM +0000, Antoine Brodin wrote: > > On Sat, Nov 11, 2017 at 10:39 PM, Mateusz Guzik wrote: > > > Author: mjg > > > Date: Sat Nov 11 22:39:33 2017 > > > New Revision: 325726 > > > URL: https://svnweb.freebsd.org/changeset/base/325726 > > > Log: > > > Avoid locking and refing in sysctl_kern_proc_args if possible. > > > Turns out the sysctl is called a lot e.g. by pkg-static. > > > Modified: > > > head/sys/kern/kern_proc.c > > There is a regression after this commit: x11-toolkits/gnustep-gui no > > longer builds. > > You can find a failure log at > > http://pb2.nyi.freebsd.org/data/111i386-default-PR224618/2017-12-28_12h28m51s/logs/errors/gnustep-gui-0.25.1_3.log > > The failure seems to be from lang/gnustep-base: > > /* get the argument vectors */ > > vectors = kvm_getargv(kptr, proc_ptr, 0); > It looks like the new fast path only works properly if p->p_args is not > NULL. If p->p_args is NULL, this usually means that the arguments are > longer than ps_arg_cache_limit and must be retrieved from (pageable) > process memory and not wired p->p_args->ar_args. It is possible to > duplicate that piece of code as well but that is probably not worth it. I created a review that fixes the problem, but I am not completely sure that it preserves the original intent of the optimization: https://reviews.freebsd.org/D13729 -- Jilles Tjoelker