hdparm utilizes shared memory for no good reason ?
Rob Landley
rob at landley.net
Tue May 16 15:36:52 UTC 2006
On Tuesday 16 May 2006 7:49 am, Tito wrote:
> On Tuesday 16 May 2006 08:19, Mike Frysinger wrote:
> > was trying to use `hdparm -t` on a uClinux host when it failed with:
> > could not allocate sharedmem buf
> >
> > this is because hdparm uses shm* functions to get a buffer of memory ...
> > but afaict, there's no reason a buffer created on the stack/heap wouldnt
> > work just as well
> >
> > could someone enlighten me as to why the shm* stuff is needed ?
> > -mike
>
> It is what the real hdparm does, after Rob applies my pending shrinkage
> and bugfix patch I can try to write a fix for that ...
Sorry, got distracted by md5sum yesterday.
Applied, svn 15089.
> if you haven't one
> already. Please notice that the patch contains an update for the timing
> functions to the code of hdparm 6.6+, but i'm sure it uses the shm* stuff
> the same.
I only reviewed about 1/3 of it (it's big but seemed sane) and then made sure
it compiled and ran make bloatcheck against it. At this point, you know more
about hdparm than I do.
P.S. My ideal size info for a patch is "make bloatcheck" on a defconfig
before and after the patch is applied. It's not a requirement, but if you're
going to provide size info anyway that's what I find most useful. FYI.
> Ciao,
> Tito
Rob
--
Never bet against the cheap plastic solution.
More information about the busybox
mailing list