Subject: Re: LKM diff for review
To: Peter Postma <peter@pointless.nl>
From: Matthew Orgass <darkstar@city-net.com>
List: tech-kern
Date: 10/25/2004 17:24:46
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.
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.
Matthew Orgass
darkstar@city-net.com