From owner-svn-src-user@FreeBSD.ORG Wed Oct 23 10:09:21 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AA3889E; Wed, 23 Oct 2013 10:09:21 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 97F0E2252; Wed, 23 Oct 2013 10:09:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9NA9LsU016001; Wed, 23 Oct 2013 10:09:21 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9NA9LOo016000; Wed, 23 Oct 2013 10:09:21 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201310231009.r9NA9LOo016000@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 23 Oct 2013 10:09:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r256957 - user/glebius/course/05.memory X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Oct 2013 10:09:21 -0000 Author: glebius Date: Wed Oct 23 10:09:21 2013 New Revision: 256957 URL: http://svnweb.freebsd.org/changeset/base/256957 Log: Couple more bits on uma. Modified: user/glebius/course/05.memory/lection.tex Modified: user/glebius/course/05.memory/lection.tex ============================================================================== --- user/glebius/course/05.memory/lection.tex Wed Oct 23 09:54:58 2013 (r256956) +++ user/glebius/course/05.memory/lection.tex Wed Oct 23 10:09:21 2013 (r256957) @@ -781,28 +781,70 @@ ITEM & SIZE & LIMIT & USED & FR \begin{column}{.03\paperwidth} \end{column} \begin{column}{.97\paperwidth} -m = uma\_zalloc(zone, \ldots); -\begin{tikzpicture}[node distance=5mm] - \node [name=zone, struct, rectangle split parts=4] { +\begin{tikzpicture}[node distance=5mm, font=\scriptsize] + \node [name=keg, struct, rectangle split parts=4] { + \textbf{struct uma\_keg} + \nodepart{two} LIST\_HEAD(,uma\_slab) uk\_part\_slab + \nodepart{three} LIST\_HEAD(,uma\_slab) uk\_free\_slab + \nodepart{four} LIST\_HEAD(,uma\_slab) uk\_full\_slab + }; + +\tikzset { + slab/.style = {draw, thick, rounded corners, + rectangle split, rectangle split draw splits=false, + rectangle split horizontal, + minimum width=10ex, minimum height=3ex}, + fslab/.style = {slab, + rectangle split part fill={struct!50, struct!50, struct!50, + struct!50}}, + pslab1/.style = {slab, + rectangle split part fill={struct!50, struct!50, white!50, + white!50}}, + pslab2/.style = {slab, + rectangle split part fill={struct!50, white!50, white!50, + white!50}}, + eslab/.style = {slab, + rectangle split part fill={white!50, white!50, white!50, + white!50}}, +} + + \node [name=fslab1, fslab, + below=10mm of keg.south west, anchor=north west, xshift=-8mm] {}; + \node [name=fslab2, fslab, node distance=1mm, below=of fslab1] {}; + \node [name=fslab3, fslab, node distance=1mm, below=of fslab2] {}; + \node [name=fslab4, fslab, node distance=1mm, below=of fslab3] {}; + \node [name=pslab1, pslab1, right=of fslab1] {}; + \node [name=pslab2, pslab2, node distance=1mm, below=of pslab1] {}; + \node [name=eslab, eslab, right=of pslab1] {}; + + \draw [pointer] (keg.four east) -- ++(1mm,0) -- +(0,-5mm) -| (fslab1.north); + \draw [pointer] (keg.three east) -- ++(2mm,0) -- +(0,-14mm) -| (pslab1.north); + \draw [pointer] (keg.two east) -- ++(3mm,0) -- +(0,-22mm) -| (eslab.north); + +\onslide<2-> { + \node [name=zone, left=of keg, struct, rectangle split parts=4] { \textbf{struct uma\_zone} \nodepart{two} struct uma\_cache uz\_cpu\lbrack$ncpus$\rbrack \nodepart{three} LIST\_HEAD(,uma\_bucket) uz\_buckets \nodepart{four} struct uma\_keg *uz\_keg }; - \node [name=cache, below left=5mm and 0mm of zone, + \node [name=cache, below=of zone.south west, anchor=north west, struct, rectangle split parts=3] { \textbf{struct uma\_cache} \nodepart{two} uma\_bucket\_t uc\_freebucket \nodepart{three} uma\_bucket\_t uc\_allocbucket }; - \node [name=bucket, below=of zone, struct, rectangle split parts=4] { + \node [name=bucket, below=of cache.south west, anchor=north west, + struct, rectangle split parts=4] { \textbf{struct uma\_bucket} \nodepart{two} int16\_t ub\_cnt \nodepart{three} int16\_t ub\_entries \nodepart{four} void *ub\_bucket\lbrack\rbrack }; - \draw [pointer] (zone.two west) -| (cache.north); - \draw [pointer] (cache.two east) to [out=0, in=180] (bucket.one west); + \draw [pointer] (zone.two west) -- +(-3mm,0) |- (cache.one west); + \draw [pointer] (cache.two west) -- +(-3mm,0) |- (bucket.one west); + \draw [pointer] (zone.four east) to [out=0, in=180] (keg.one west); +} \end{tikzpicture} \end{column} \end{columns}