Subject: Re: LKM diff for review
To: Matthew Orgass <darkstar@city-net.com>
From: None <cube@cubidou.net>
List: tech-kern
Date: 10/25/2004 23:27:16
On Mon, Oct 25, 2004 at 05:24:46PM -0400, Matthew Orgass wrote:
> On 2004-10-25 peter@pointless.nl wrote:
> > On Mon, Oct 25, 2004 at 01:37:42PM +0200, cube@cubidou.net wrote:
> > > On Mon, Oct 25, 2004 at 08:32:04PM +1000, matthew green wrote:
> > >
> > > > static max. i don't see any reason not to remove this limit...
> > >
> > > I don't mind that change either, of course. I'm wondering if it is a
> > > real clean-up, though. Sure, it saves 800 bytes or so, but adds some
> > > complexity, and I don't quite get that refcnt thing; I find it
> > > confusing to change 'used' by 'refcnt' if there is no intent of adding
> > > dependency support.
> > >
> >
> > The refcnt is not for dependency support, I've just used that name from
> > OpenBSD. In OpenBSD there's also a depcnt (unused) but I didn't added that
> > one. The refcnt is just needed for some extra sanity.
>
> "refcnt" appears to be used as a "data valid" indicator. It should at
> least not be called refcnt and not incremented. I didn't look at the rest
> of the code to see if it is actually needed at all.
Yes. Current code has a 'used' field, which makes more sense. But this is
turning into a bikeshed discussion.
> Also, this change does not save 800 bytes of kernel memory. I would
> guess it comes out about even on most CPUs, but might actually increase
> memory usage a few bytes. Not that it matters in this case, but if you
> are going to argue memory usage you need to consider the full effect of
> the change, not just one part of it.
When I mentioned that number, my point was that it's the not the point.
Here the goal is to remove a static limit.
Go ahead, Peter, before it gets too silly.
Quentin Garnier.