X-Original-To: alpine-devel@mail.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 288E9DC1BAF for ; Fri, 15 Jan 2016 04:55:02 +0000 (UTC) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id E3F98DC0EC0 for ; Fri, 15 Jan 2016 04:55:01 +0000 (UTC) Received: by mail-pa0-f54.google.com with SMTP id uo6so373308826pac.1 for ; Thu, 14 Jan 2016 20:55:01 -0800 (PST) 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=RIkeKLRq2X3r9QYhKFP9RKpaJcli2chjqXlRvZaJ1Fg=; b=Dph1ZUpulloF962ARnFxsyNrGxyvFnh/2b/1/caLE2xBOS03lZayHT/CBHk4CHXu+L 7vZPsOtGo5nR6KODo73QLTnqNs3BLV41GuGRYtIrT0yrBaPQAo/0JTu+rMpLq375T9g7 iOdl30J6Xrwcb9li/TUkmaj4IraK9otF/xo+9C3vOnTQ5xw0n0omXJEoV1d7fbNIf4pB cMpp2tW5+YQzf1n4eOrDQlE/t1nPQVUdMPoNfpulTPy9faCia/Q1QzpEBQQm6vPBcf7L 9jOT88+GfXC9UEFBCp4SMhdgUzt9e1K3UtEfRpPad+tBNIlkoR3hw4siu6kT5Gbk3KMr aPCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=RIkeKLRq2X3r9QYhKFP9RKpaJcli2chjqXlRvZaJ1Fg=; b=ebb67hIrb2Q7HJs71qXdUSgQpi4FPm/+v4Xba0/pCcT2YjScO50lymPQIp81tN/bSd p8FawIGki2DbzPIX5HtZDac/a1lr8DvYqWn8KNZnroggUfuXWynuwQSoPLqTbfuKBzhm 0bQ/NLFBJ2oL2dP4lffuBHxZuT6uFL9XGqO9iehuwHb9mVgG0BA4AtwXeR5F+GIUXFJB C2XiLgpDPHPfNjt6HmWCh9VhOLEQJ10E2NPVugxnYrXZalOSwj9OuVm0TpebYRsU+FwP BJzUfxJxwEUWdZDvFhd8g5DRwv+OU8aFPKWEVVDsJYvWy5BURVGtILoNc3HmjlXYVLU1 1Sdw== X-Gm-Message-State: ALoCoQkIoRz1w9kuA0Pmjaa7cRPINic6z1upFPGzzaYSML1o2S2RZz9HQzdXGlYqw2Uca8aQoofvBCBhvZUd/lKmqa5bq0cxkw== X-Received: by 10.66.250.165 with SMTP id zd5mr12113654pac.9.1452833700817; Thu, 14 Jan 2016 20:55:00 -0800 (PST) Received: from newbook ([50.0.225.136]) by smtp.gmail.com with ESMTPSA id n2sm12663356pfj.16.2016.01.14.20.54.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jan 2016 20:55:00 -0800 (PST) Date: Thu, 14 Jan 2016 20:54:52 -0800 From: Isaac Dunham To: Laurent Bercot Cc: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] udev replacement on Alpine Linux Message-ID: <20160115045451.GA10573@newbook> References: <20150728052436.GC1923@newbook> <20160112153804.GI32545@example.net> <56953ABE.5090203@skarnet.org> <56958E22.90806@skarnet.org> <56964414.1000605@skarnet.org> <56978822.8020205@skarnet.org> X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56978822.8020205@skarnet.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Virus-Scanned: ClamAV using ClamSMTP On Thu, Jan 14, 2016 at 12:36:02PM +0100, Laurent Bercot wrote: > On 14/01/2016 06:55, Jude Nelson wrote: > >I think you're close. The jist of it is that vdev needs to supply a > >lot more information than the kernel gives it. In particular, its > >helper programs go on to query the properties and status of each > >device (this often requires root privileges, i.e. via privileged > >ioctl()s), and vdev gathers the information into a (much larger) > >event packet and stores it in a directory tree under /dev for > >subsequent query by less-privileged programs. > > I see. > I think this is exactly what could be made modular. I've heard > people say they were reluctant to using vdev because it's not KISS, and > I suspect the ioctl machinery and data gathering is a large part of > the complexity. If that part could be pluggable, i.e. if admins could > choose a "data gatherer" just complex enough for their needs, I believe > it could encourage adoption. In other words, I'm looking at a 3-part > program: > - the netlink listener > - the data gatherer > - the event publisher > > Of course, for libudev to work, you would need the full data gatherer; > but if people aren't using libudev programs, they can use a simpler one, > closer to what mdev is doing. > It's all from a very high point-of-view, and I don't know the details of > the code so I have no idea whether it's envisionable for vdev, but that's > what I'm thinking off the top of my head. I haven't really looked at the vdevd code in a while, but from what I recollect... The vdev/libudev-compat "solution" is split up as follows: -the netlink listener, vdevd -several data gatherers, which are invoked according to a set of rules for vdevd (analogous to mdev.conf) -helper scripts to create extra links and so on, run via the same rules -I don't recall exactly how the event publishing is done, but IIRC, there's a daemon watching the directory where the helpers write out the data, and then distributing it as described -libudev-compat is libudev, patched to read events that are published as described -IIRC, there's some helper that will (also? instead?) maintain a list of devices more like the way udev does, so you don't *need* libudev-compat. Jude went to a bit of effort to design vdevd and libudev-compat so that it would be possible to use part alongside mdev. The discussion is in the Devuan archives; I don't recall how far back, though. HTH, Isaac Dunham --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---