tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: RFC: Constant Database Support



In article <20100320024241.GA25267%britannica.bec.de@localhost>,
Joerg Sonnenberger  <joerg%britannica.bec.de@localhost> wrote:
>On Sat, Mar 20, 2010 at 02:20:42AM +0000, Christos Zoulas wrote:
>> In article <20100319223726.GA27773%britannica.bec.de@localhost>,
>> Joerg Sonnenberger  <joerg%britannica.bec.de@localhost> wrote:
>> >On Tue, Mar 09, 2010 at 05:04:17PM +0100, Joerg Sonnenberger wrote:
>> >> Remaining requestion is what to do with old statically linked binaries.
>> >> I'm not too found of keeping the legacy support in services_mkdb and the
>> >> old files remain valid. Comments?
>> >
>> >Third iteration. services_mkdb(8) has a new argument to decide what
>> >output format to create, defaulting to cdb. Use the fast_divide32,
>> >dropping lookup performance for getservbyport(3) by 10% on my Core2.
>> >
>> >Patch can be found at http://www.netbsd.org/~joerg/cdb+services.diff
>> >
>> >Numbers have been posted yesterday for lookup performance. Any other
>> >concerns that have not been addressed?
>> 
>> Permissions?
>
>Sorry, fixed.

Thanks.

- cdbr.h cpp protection inclusion symbol should match the filename.
- I would sort the members in struct cdbr by size to avoid padding.
- should that + 40 in cdbr_open be a sizeof(something)?
- perhaps get_uintX should have a default case that aborts?
- cdbr_get does not always set errno.
- nor does cdbr_find.
- why keep cdbr->fd open after you mmaped? why keep it in the structure at all?
- I would sort struct cdbw too.
- Should the cdbw routines set errno? They do sometimes (malloc failures).
- I would put the magic number in some private header so I don't have to repeat
  it in two places.

Looks fine to me.

christos




Home | Main Index | Thread Index | Old Index