Re: [PATCH v3] lib/raid/xor: x86: Add AVX-512 optimized xor_gen()
From: David Laight
Date: Thu Jun 18 2026 - 06:04:12 EST
On Thu, 18 Jun 2026 11:25:00 +0200
Christoph Hellwig <hch@xxxxxx> wrote:
> On Wed, Jun 17, 2026 at 11:05:16AM +0100, David Laight wrote:
> > > FYI, one or 2 sources are basically useless as they RAID5 configs
> > > that have no benefits over simple mirroring and thus the numbers
> > > aren't too interesting.
> >
> > With three disks you xor two buffers (src_count == 1) to get the parity
> > to write to the third - so that is a valid RAID5 config.
>
> Sure. It did not say it is invalid, it just isn't very useful.
>
It gives you 2/3 the total capacity, mirroring only gives 1/2.
But for a lot of uses I suspect disks are cheap enough that mirroring
is usually the 'best bet'.
It also means that there are a set of catastrophic failures that can
be more easily recovered.
It is probably more important to ensure all the disks in a raid set
come from different production lines - otherwise they are likely to
fail at the same time.
At least modern disks don't (seem to) suffer from 'sticky oil' which
would tend to stop them restarting after they got cold while turned off.
Raid doesn't help when multiple disks fail to start!
David