From owner-svn-src-all@freebsd.org Wed Jan 17 23:06:32 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 78CE8EBE223; Wed, 17 Jan 2018 23:06:32 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6003A3C25; Wed, 17 Jan 2018 23:06:31 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id w0HMetmG017143 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 17 Jan 2018 14:40:55 -0800 (PST) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id w0HMesgn017142; Wed, 17 Jan 2018 14:40:54 -0800 (PST) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 17 Jan 2018 14:40:54 -0800 From: Gleb Smirnoff To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r327354 - head/sys/vm Message-ID: <20180117224054.GO8113@FreeBSD.org> References: <201712291905.vBTJ57gI072871@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201712291905.vBTJ57gI072871@repo.freebsd.org> User-Agent: Mutt/1.9.1 (2017-09-22) 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: Wed, 17 Jan 2018 23:06:32 -0000 On Fri, Dec 29, 2017 at 07:05:07PM +0000, Konstantin Belousov wrote: K> Author: kib K> Date: Fri Dec 29 19:05:07 2017 K> New Revision: 327354 K> URL: https://svnweb.freebsd.org/changeset/base/327354 K> K> Log: K> Style. K> K> Reviewed by: alc K> Sponsored by: The FreeBSD Foundation K> MFC after: 1 week K> Differential revision: https://reviews.freebsd.org/D13678 K> K> Modified: K> head/sys/vm/vm_swapout.c K> K> Modified: head/sys/vm/vm_swapout.c K> ============================================================================== K> --- head/sys/vm/vm_swapout.c Fri Dec 29 18:42:55 2017 (r327353) K> +++ head/sys/vm/vm_swapout.c Fri Dec 29 19:05:07 2017 (r327354) K> @@ -556,16 +556,14 @@ vm_thread_swapin(struct thread *td) K> { K> vm_object_t ksobj; K> vm_page_t ma[KSTACK_MAX_PAGES]; K> - int pages; K> + int a, count, i, j, pages, rv; K> K> pages = td->td_kstack_pages; K> ksobj = td->td_kstack_obj; K> VM_OBJECT_WLOCK(ksobj); K> (void)vm_page_grab_pages(ksobj, 0, VM_ALLOC_NORMAL | VM_ALLOC_WIRED, ma, K> pages); K> - for (int i = 0; i < pages;) { K> - int j, a, count, rv; K> - K> + for (i = 0; i < pages;) { K> vm_page_assert_xbusied(ma[i]); K> if (ma[i]->valid == VM_PAGE_BITS_ALL) { K> vm_page_xunbusy(ma[i]); Yeah, style is sacred, but is there a single person on Earth who would not agree that moving variables from smaller blocks to function block reduces readability of the code? -- Gleb Smirnoff