From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 11 22:48:38 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72DEFA77 for ; Wed, 11 Mar 2015 22:48:38 +0000 (UTC) Received: from mail-wg0-x22d.google.com (mail-wg0-x22d.google.com [IPv6:2a00:1450:400c:c00::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EC89BA6D for ; Wed, 11 Mar 2015 22:48:37 +0000 (UTC) Received: by wghk14 with SMTP id k14so12550798wgh.3 for ; Wed, 11 Mar 2015 15:48:36 -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:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=gpp5KutUGN5uEM3yXkmJDJNy9Wmxpt1WTEQzltkXNZA=; b=JTFjxmLH+EEp7/UvB64fVv7G6eB/NbjDPQh4eNaYtl4JbvPI6Tjfu38wyOL3WWE730 bZ6mNFiDQ5Dz2o6jDmy3LqHHuo3w3iUdi/lBpk5d0dXsTAq4DwMMUBT579/tNNx5RyYw tZRuu+2lTQoqefutCLO5X3xTtOEW60zQ8jWCxAIgCIQIUJ2umuLJH8pikohvCkJvwXYs 3f3bWnvOfKJI2dPDDCHDSyHelspIGX4tPA7jliFPQbZ/xUKq8hvd5A98ehr3+mmzQbbz wmF3kzu+hZ/L2/STQXL8tOINL//m0hl7IRncDvN5l5GJOM5QYzcj07TznTljlY15Bm5n SilQ== X-Received: by 10.180.87.66 with SMTP id v2mr4991103wiz.51.1426114116397; Wed, 11 Mar 2015 15:48:36 -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 17sm7315562wjt.45.2015.03.11.15.48.34 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 11 Mar 2015 15:48:35 -0700 (PDT) Date: Wed, 11 Mar 2015 23:48:31 +0100 From: Mateusz Guzik To: Oliver Pinter Subject: Re: file system change notifications Message-ID: <20150311224831.GB18699@dft-labs.eu> Mail-Followup-To: Mateusz Guzik , Oliver Pinter , Kim Shrier , Shawn Webb , FreeBSD Hackers , int0dster@gmail.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: int0dster@gmail.com, FreeBSD Hackers , Shawn Webb X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2015 22:48:38 -0000 On Wed, Mar 11, 2015 at 11:11:14PM +0100, Oliver Pinter wrote: > Take a look at dazuko kernel module. Probably you should forward port > them, because they are obsoleted. > I checked the module out of curiosity. Their approach was to wrap various syscalls and work from there. This is used to be the common approach several years back it has a lot of shortcomings, complete lack of reliability being the biggest one. As for better implementation: current namecache does not guarantee name resolution (even if name was entered) and not all names end up in the cache in the first place. Lack of reliability comes from the fact that the cache does not pin vnodes in any way. The cache is also protected with one sx lock and requires users to get and drop refs during lookups. As such, I would say that the best course of action is implementing new cache instead of hacking current implementatin. Then something could be made on top of that. > On Wed, Mar 11, 2015 at 10:54 PM, Kim Shrier wrote: > > On Mar 11, 2015, at 1:14 PM, Ivan Krivonos wrote: > >> > >> Hi, > >> > >> Have not read this paper, but why just don`t kqueue() ? > >> > > > > Apparently, you have to have a file descriptor for every file you want to > > monitor, if I read things right. This is prohibitive with 100,000+ files. > > It also means that you cannot unmount a file system if you are monitoring > > any files in it, since the file system is considered busy. > > > > Kim > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" -- Mateusz Guzik