tech-userlevel archive

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

Re: RFC: Constant Database Support

In article <>,
Joerg Sonnenberger  <> wrote:
>On Sat, Mar 20, 2010 at 02:20:42AM +0000, Christos Zoulas wrote:
>> In article <>,
>> Joerg Sonnenberger  <> 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
>> >
>> >Numbers have been posted yesterday for lookup performance. Any other
>> >concerns that have not been addressed?
>> Permissions?
>Sorry, fixed.


- 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.


Home | Main Index | Thread Index | Old Index