From owner-svn-src-head@FreeBSD.ORG Mon Nov 21 12:23:27 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B7C9106566C; Mon, 21 Nov 2011 12:23:27 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id E9B828FC12; Mon, 21 Nov 2011 12:23:26 +0000 (UTC) Received: by yenq9 with SMTP id q9so275953yen.13 for ; Mon, 21 Nov 2011 04:23:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=8KGHQ1S62r/cnMJUi3ky7km0QF+HCWp0h6CCWQn2f4Q=; b=IBHGAiYPgu1qeiDCnt7LAzMcwAQkRj4ll8Dl01V/gA3JUMVnioiHVGCBfnWZcdm3p5 HMoV4AMgfvtEQV5awNU8+w9y6yhKn+THO6AJirjVowQJNhGqYENs3vQ9lksSM161SIjw 8xRN3JFGZGeOHHDzDhfivKsw3//U9Ue6XJfis= MIME-Version: 1.0 Received: by 10.182.36.36 with SMTP id n4mr2936263obj.16.1321878206179; Mon, 21 Nov 2011 04:23:26 -0800 (PST) Sender: pluknet@gmail.com Received: by 10.182.142.101 with HTTP; Mon, 21 Nov 2011 04:23:26 -0800 (PST) In-Reply-To: <20111121105108.GE50300@deviant.kiev.zoral.com.ua> References: <201111211036.pALAavS7039188@svn.freebsd.org> <20111121105108.GE50300@deviant.kiev.zoral.com.ua> Date: Mon, 21 Nov 2011 15:23:26 +0300 X-Google-Sender-Auth: dRtvsxlXXovZTw3RAN_lgCNvgHc Message-ID: From: Sergey Kandaurov To: Kostik Belousov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r227784 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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, 21 Nov 2011 12:23:27 -0000 On 21 November 2011 14:51, Kostik Belousov wrote: > On Mon, Nov 21, 2011 at 10:36:57AM +0000, Sergey Kandaurov wrote: >> Author: pluknet >> Date: Mon Nov 21 10:36:57 2011 >> New Revision: 227784 >> URL: http://svn.freebsd.org/changeset/base/227784 >> >> Log: >> =A0 Use the acquired reference to the vmspace instead of direct derefere= ncing >> =A0 of p->p_vmspace like it is done in sysctl_kern_proc_vmmap(). >> >> Modified: >> =A0 head/sys/kern/kern_proc.c >> >> Modified: head/sys/kern/kern_proc.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/kern/kern_proc.c Mon Nov 21 08:12:36 2011 =A0 =A0 =A0 =A0(r= 227783) >> +++ head/sys/kern/kern_proc.c Mon Nov 21 10:36:57 2011 =A0 =A0 =A0 =A0(r= 227784) >> @@ -1528,7 +1528,7 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_A >> =A0 =A0 =A0 } >> =A0 =A0 =A0 kve =3D malloc(sizeof(*kve), M_TEMP, M_WAITOK); >> >> - =A0 =A0 map =3D &p->p_vmspace->vm_map; =A0 =A0/* XXXRW: More locking r= equired? */ >> + =A0 =A0 map =3D &vm->vm_map; =A0 =A0 =A0/* XXXRW: More locking require= d? */ > It makes sense to remove the XXXRW comment, from both places. Thanks for your comment, committed. [Just though, why it was not done so far and if that comment may relate to something else.. ] > >> =A0 =A0 =A0 vm_map_lock_read(map); >> =A0 =A0 =A0 for (entry =3D map->header.next; entry !=3D &map->header; >> =A0 =A0 =A0 =A0 =A0 entry =3D entry->next) { > --=20 wbr, pluknet