> > > As I understand it, the kernel tests parity calc speed and decides to
> > > use/not use mmx based on which is faster.
> > >
> > > Assuming an otherwise heavily loaded cpu, would it not be better to use
> > > mmx even though slightly slower just to free up cpu cycles for other
> > tasks.
> >
> > If you are doing the calculations faster, it takes shorter time before the
> > CPU is free to do other things. Fastest is fastest.
> >
> Hmmm.... not really, if so, why would we have multi-processor systems.
> mmx is a distinct processor apart from the fpp or main cpu. It is
> possible for all to be doing separate operations at the same time.
> i.e. gzip, raid parity, network traffic
untrue. mmx is NOT a separate entity within an intel cpu. go read the data
sheets for any mmx intel cpu. or even better, go read the simd article at
www.arstechnica.com
mmx, due to its cheap, hackish nature, re-uses the fpu registers. you cannot
do an mmx instruction followed by an fpu instruction in the same program
without a painful context switch.
this is not an issue with other processes on the system, however, since you
are going to have some task switching anyway when you go from the raid parity
code back to a userland piece of code and so on.
there is always the debate as well about how well your compiler/kernel will
order your instructions/schedule your procs so that different functional units
within the cpu keep their pipelines full.
afaik, it is better to just write fast code and get it out of the way of the
other procs asap, than try to get two different procs to execute two different
instruction sets on the same cpu at the same time.
allan
>
> > >
> > > If I don't have the right picture here, someone please provide an
> > > explaination of where the cpu cycles go to raid.
> > >
> > > This reason for my question is the amount of "nice" cycles on one of my
> > > machines that is fairly busy. Only raid5d is niced, and I'm running a
> > > load factor over one consistently with only about a 20% cpu load. It
> > > appears most of the cpu cycles in use go to raid5 -- presumably parity
> > > calculations.
> >
> > What kinda disks are you running on? SCSI? IDE? If IDE, do you have all
nice
> > things such as DMA transfers enabled?
> >
> IDE 33 +dma
>
> > >
> > > Assuming I'm not too far off base, it would be nice to have a /proc
> > > option or at least a compile option to force use of mmx for raid parity
> > > and a way to run the parity calculation test manually to see the
> > difference
> > > between the two methods.
> >
> > Maybe not for speed, but for bug tracing. Anyway, that would be good.
> >
> > >
>