On Monday 14 July 2008 01:40:02 Denys Vlasenko wrote:
> On Sunday 13 July 2008 11:57, Rob Landley wrote:
> > On Saturday 12 July 2008 05:36:05 Denys Vlasenko wrote:
> > > BTW: there is a speedup opportunity in mdev -s: we parse config file
> > > repeatedly (which includes compiling regexp) for each device scanned!
> >
> > Which is generally a cache local activity, probably not even as expensive
> > as a system call (although I admit I haven't benched it with that in mind
> > and it could vary by platform).  I do know that back when I _did_ bench
> > it for overall performance, it did quite well.
>
> make_device() opens a config file and reads it all. And with mdev -s,
> maked_device is called for every device. So opening/reading/closing
> is repeated many times.

I thought there was an mmap(), and that it was done outside the loop...?

I vaguely recall the uClinux people correcting me to feed different flags to 
mmap in a way that would still let me modify the memory mapping (to insert 
nulls into it) without writing the result back to disk, yet wouldn't screw up 
a nommu system.  (This is what the dynamic linker has to do anyway, so it 
_must_ work...)

The file gets _parsed_ several times, but that's a linear scan over a block of 
memory that faults in a cache line at a time in sequence and stays in L2 
cache if there is any to speak of, so it should be fine...

I take it somebody changed this since I was last paying attention?

Rob
-- 
"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to