From owner-svn-src-all@FreeBSD.ORG Sun Jul 6 21:18:57 2014 Return-Path: Delivered-To: svn-src-all@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 ESMTPS id 24E92CED; Sun, 6 Jul 2014 21:18:57 +0000 (UTC) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F9A3266A; Sun, 6 Jul 2014 21:18:56 +0000 (UTC) Received: by mail-wi0-f169.google.com with SMTP id hi2so13857658wib.0 for ; Sun, 06 Jul 2014 14:18:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=rPFtZRn/EN9Wiys0+zIcYwiXxTWXr6brPzL1YN628qU=; b=cio+gjkDc78WuQXrzU3O49ght3Aepw9iea5mvzHDZzhfXmvLyqI2wZC0+PJ4b+FMbk Nlkgb499CQ0HBSILeD9Y4gPiWVL2qHe0LYbdJbeZccXXH+DzbotM8OpK0h2NIY0xqr5b 7i6idEMhtwrs/qQkWZBwehtriCAjff6+s1REALD+H6but+C5X0uu6g0MYn8PJ/ANzYOu g1YXhn9aDRMmXU20xK0szWtKtbAqMly1yFreFF65RK6Rmsnn+KbriM5xjPgaRrWdmJyX obuQ5LeYgDnipFAz6T7FSPk6EpSpWntiZgeTlR0oO4L76fnO5QBmOwmdoNq/H518aCtl 80CQ== X-Received: by 10.180.81.37 with SMTP id w5mr70820001wix.65.1404681534412; Sun, 06 Jul 2014 14:18:54 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id gh16sm107192414wic.3.2014.07.06.14.18.53 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 06 Jul 2014 14:18:53 -0700 (PDT) Date: Sun, 6 Jul 2014 23:18:51 +0200 From: Mateusz Guzik To: Konstantin Belousov Subject: Re: svn commit: r268087 - head/sys/kern Message-ID: <20140706211850.GA17706@dft-labs.eu> References: <201407010921.s619LXHL063077@svn.freebsd.org> <20140701114245.GO93733@kib.kiev.ua> <20140701115612.GA26696@dft-labs.eu> <20140701123058.GP93733@kib.kiev.ua> <20140701125410.GB26696@dft-labs.eu> <20140701180903.GT93733@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20140701180903.GT93733@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 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: Sun, 06 Jul 2014 21:18:57 -0000 On Tue, Jul 01, 2014 at 09:09:03PM +0300, Konstantin Belousov wrote: > On Tue, Jul 01, 2014 at 02:54:10PM +0200, Mateusz Guzik wrote: > > It is passed down to MAC (mac_vnode_execve_will_transition and > > mac_vnode_execve_transition) and then vfs_mark_atime. > And we can lock it only there. > I don't see how this code could be reorganized to reduce vnode lock coverage and not add unlock + lock pair to the common case (no hwpmc and no credential change). vfs_mark_atime is only called when execve cannot return an error anymore, with vnode locked and proc unlocked. Moving it before hwpmc checks would require additional pair of proc unlock/lock. That said, I would prefer to just commit previously proposed fixup. -- Mateusz Guzik