Gentoo Archives: gentoo-dev

From: Joost Roeleveld <joost@××××××××.org>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] udev and /usr
Date: Thu, 15 Sep 2011 16:05:41
Message-Id: 3639422.QgOtQNiHae@eve
In Reply to: Re: [gentoo-dev] udev and /usr by Zac Medico
1 On Thursday, September 15, 2011 08:07:35 AM Zac Medico wrote:
2 > On 09/15/2011 07:33 AM, Joost Roeleveld wrote:
3 > > The use for an initrd/initramfs/... will create an additional layer of
4 > > complexity a lot of us users are not really waiting for, especially as
5 > > we are not seeing any issues with our current systems.
6 >
7 > Like it or not, it's the simplest possible solution if you want separate
8 > /usr. The plan is to provide a minimal initramfs that won't contain any
9 > modules, so it won't have to be rebuilt for each kernel. See the "/usr
10 > vs. initramfs redux" thread:
11 >
12 > http://archives.gentoo.org/gentoo-dev/msg_020fa80d72c84c5b587b90d8001264ef.x
13 > ml
14
15 Zac,
16
17 Thank you for your response, however, I do have a few questions about this.
18 Where will this default initramfs actually need to be placed? Also, how will
19 we be able to deal with situations where this script fails?
20
21 If Gentoo does decide to follow the initramfs-route, why not simply implement
22 /etc/init.d/localmount in the initramfs? Why require users to figure out which
23 filesystems are needed for udev?
24
25 Also, I was actually hoping for a reply to the rest of my email as well,
26 especially the idea for splitting udev into 2 seperate processes.
27
28 What I'm thinking off would be the following in pseudo-code:
29
30 --- process 1 ---
31 while(wait_for_event())
32 {
33 kevent* pkEvent = NULL;
34 if(get_waiting_kernel_event(pkEvent)) // returns true if an event was
35 waiting
36 {
37 action_event = process_kernel_event(pkEvent);
38 if (action_event != NULL)
39 {
40 put_action_event(pkEvent);
41 }
42 }
43 }
44
45 ------
46
47 --- process 2 ---
48 while(wait_for_event())
49 {
50 aevent* paEvent = NULL;
51 if(get_waiting_action_event(paEvent)) // returns true if an event was
52 waiting
53 {
54 process_action_event(paEvent);
55 }
56 }
57 -------
58
59 In "human" that would be:
60
61 The kernel puts events in the new-dev-event-queue that process 1 picks up.
62 process 1 creates the /dev-entrie(s) and, if there is an action to be taken,
63 puts the action in the new-action-event-queue.
64
65 Process 2 will then pick up this action from the new-action-event-queue and
66 will process this.
67
68 If, as a side-effect, of the action processed by process 2, a new device
69 appears for the kernel, the kernel will simply put a corresponding event in
70 the new-dev-event-queue.
71
72 I don't see why this option would be ignored. Especially as the simpler
73 process 1 should be smaller and as such less likely to contain bugs and any
74 action that needs to be taken can be done manually to test why something isn't
75 working correctly if the boot-process, for whatever reason, fails.
76
77 I'm not a good enough developer to do build this myself, but I am willing to
78 try this.
79 All I'm asking for is the help and advice of more experienced developers with
80 the design and implementation.
81
82 If someone can explain to me why my idea won't work, please let me know.
83
84 If someone actually has some ideas on how to implement it, I would really
85 appreciate it. My current idea is to try to split the 2 parts out of udev and
86 have it use the same configuration files.
87
88 Many thanks,
89
90 Joost

Replies

Subject Author
Re: [gentoo-dev] udev and /usr Zac Medico <zmedico@g.o>