1 |
On Sun, Nov 20, 2005 at 11:33:02AM +0900, Jason Stubbs wrote: |
2 |
> On Sunday 20 November 2005 01:11, Brian Harring wrote: |
3 |
> > On Sun, Nov 20, 2005 at 12:50:25AM +0900, Jason Stubbs wrote: |
4 |
> > <regarding FsLocks and keeping fds open while unlocked> |
5 |
> > > I still don't see why fds should remain open after all locks are |
6 |
> > > released. What my point above is about is that if some external process |
7 |
> > > creates a bunch of FsLock objects that it keeps around to obtain future |
8 |
> > > locks (bad design, but) fds will quickly become used up when they are not |
9 |
> > > actually being used for anything. |
10 |
> > |
11 |
> > How about a configurable? |
12 |
> > |
13 |
> > From where I'm sitting, running out of fds *really* shouldn't occur. |
14 |
> > This locking is strictly fs orientated, synchronization points on the |
15 |
> > fs shouldn't be too many. |
16 |
> > |
17 |
> > Via a configurable, we can avoid open/close for every unlocked -> lock |
18 |
> > and lock -> unlocked transition; if fd exhaustion becomes an issue, |
19 |
> > we can just modify the class to ignore the configurable, so that it |
20 |
> > falls back to open/close during transitions. |
21 |
> > |
22 |
> > Compromise of sorts, plus it's probably useful for the class. :) |
23 |
> |
24 |
> Still not seeing the benefit... All usage of FsLock within the patch is to |
25 |
> create an instance, lock it, unlock it and then destroy it. I can't think of |
26 |
> any usage that differs from that in the rest of portage code either. |
27 |
|
28 |
Common code. Stable may not use it, but I intend to in savior... |
29 |
|
30 |
> > Offhand... it's a bit nuts, but conversion of stable to the class |
31 |
> > based instance might be worthwhile, rather then the crap func route we |
32 |
> > have right now. |
33 |
> > |
34 |
> > One issue though is that portage_locks will cycle through flock/lockf, |
35 |
> > then falling back to the evil hardlink locking- this code is strictly |
36 |
> > flock. Thoughts on trying to clean up that crap in stable, or just |
37 |
> > leave the mess as it is and try and replace it down the line? |
38 |
> |
39 |
> Moving over sounds good to me. I don't really trust the current lock_method |
40 |
> cycling. It usually comes into play with network mounts, right? |
41 |
Reiserfs managed to kick the cycling into lockf rather then flock in a |
42 |
few occasions. Pretty much if the setup is questionable/stupid/laggy, |
43 |
falling from flock to lockf to hardlink probably will occur. |
44 |
|
45 |
Would have to do some digging to find the scenarios; nfs is one of |
46 |
'em, as is samba. |
47 |
|
48 |
> So unless all |
49 |
> machines that are trying to access happen to choose the same lock_method, |
50 |
> locking is essentially disabled anyway. |
51 |
Not disabled... silently thinking it works. |
52 |
It's evil. :) |
53 |
|
54 |
> Being able to configure what locking |
55 |
> method is used would be much saner... |
56 |
Agreed, although locking per fs is the real need, not global (I make |
57 |
no comments about complexity involved, since I don't know). |
58 |
|
59 |
> > > > Curious, qualms about using a massively cleaned up version of this? |
60 |
> > > > The reason I wanted this seperated out and backported was to go with |
61 |
> > > > an actual registry, and abuse the existing code- specific complaints |
62 |
> > > > with that route, beyond patch sucking? |
63 |
> > > |
64 |
> > > None here. For what it's worth at this late stage, this patch is much |
65 |
> > > better than my attempt. :) |
66 |
> > |
67 |
> > This is version 3 of the savior plugins registry. You *really* do not |
68 |
> > want to see the first two I created (hence them never being in cvs). |
69 |
> > It's a fun bit to attempt :) |
70 |
> > |
71 |
> > So... assuming a plugin registry with on disk files is an agreeable |
72 |
> > approach, what would be the initial targets? Cache comes to mind, but |
73 |
> > what else? |
74 |
> > |
75 |
> > The problem with a registry is it just points at the func/code to load |
76 |
> > up; for elog (fex), it's not binding any configuration information to |
77 |
> > it- it *could* be managed by pointing at a func that holds the |
78 |
> > configuration info, but that's massively unclean (plus it'll stomp on |
79 |
> > 3.0 goals of code/config seperation). |
80 |
> |
81 |
> This sounds like a "fun" issue. Might leave it dangle for a bit. ;) |
82 |
Agreed. Just throwing it out there so people don't go and do it and I |
83 |
have to yell at them about mucking things up. :) |
84 |
|
85 |
> Speaking of versions, nothing has been decided yet in the 2.0.54/2.1.0/2.2.0 |
86 |
> debate. It's pretty much decided that 2.0.x will be only small sets of bug |
87 |
> fixes from now on, right? |
88 |
No complaints over a week...ish + everyone is around == works for me. |
89 |
|
90 |
Marius, willing to live with 2.1 as next minor release? I'm not |
91 |
really much for skipping 2.1, but just because I'm noisy doesn't mean |
92 |
I'm right (nor that I speak for the majority)... |
93 |
~harring |