From owner-svn-src-head@freebsd.org Mon Apr 25 15:50:56 2016 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 1FCE4B1CDDC; Mon, 25 Apr 2016 15:50:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB80E18AB; Mon, 25 Apr 2016 15:50:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u3PFoiq2012984 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 25 Apr 2016 18:50:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u3PFoiq2012984 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u3PFoiYl012981; Mon, 25 Apr 2016 18:50:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 25 Apr 2016 18:50:44 +0300 From: Konstantin Belousov To: Ruslan Bukin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r298580 - in head/sys/riscv: include riscv Message-ID: <20160425155044.GO2422@kib.kiev.ua> References: <201604251447.u3PElpfe084901@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201604251447.u3PElpfe084901@repo.freebsd.org> User-Agent: Mutt/1.6.0 (2016-04-01) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 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: Mon, 25 Apr 2016 15:50:56 -0000 On Mon, Apr 25, 2016 at 02:47:51PM +0000, Ruslan Bukin wrote: > Author: br > Date: Mon Apr 25 14:47:51 2016 > New Revision: 298580 > URL: https://svnweb.freebsd.org/changeset/base/298580 > > Log: > o Implement shared pagetables and switch from 4 to 3 levels page > memory system. > +/* An entry in the list of all pmaps */ > +struct pmap_list_entry { > + SLIST_ENTRY(pmap_list_entry) pmap_link; > + struct pmap *pmap; > +}; This is weird. Why do you need separate structure to track the all pmaps list, instead of embedding the list link into pmap itself ? In particular, the pmap_list_entry.pmap pointing to the pmap looks strange. And why do you use single-linked list for the container where you need to remove elements ? The cost is the iteration over the whole container on removal, vs. additional pointer in each pmap.