improving raid 5 performance

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

 



Neil hello.

1.
i have applied the common path according to
http://www.spinics.net/lists/raid/msg11838.html as much as i can.

it looks ok in terms of throughput.
before i continue to a non common path ( step 3 ) i do not understand
raid0_mergeable_bvec entirely.

as i understand the code checks alignment . i made a version for this
purpose which looks like that:

static int raid5_mergeable_bvec(request_queue_t *q, struct bio *bio,
struct bio_vec *biovec)
{
	mddev_t *mddev = q->queuedata;
	sector_t sector=bio->bi_sector+get_start_sect(bio->bi_bdev);
	int max;
	unsigned int chunk_sectors = mddev->chunk_size >> 9;
	unsigned int bio_sectors = bio->bi_size >> 9;

	max=(chunk_sectors-((sector&(chunk_sectors-1))+bio_sectors))<<9;
	if (max < 0){
		printk("handle_aligned_read not aligned %d %d %d
%lld\n",max,chunk_sectors,bio_sectors,sector);
		return -1; // Is bigger than one chunk size
	}

//	printk("handle_aligned_read aligned %d %d %d
%lld\n",max,chunk_sectors,bio_sectors,sector);
	return max;
}

Questions:
  1.1 why did you drop the max=0 case ?
  1.2  what these lines mean ? do i need it ?
      if (max <= biovec->bv_len && bio_sectors == 0)
                return biovec->bv_len;
        else
               return max;
        }


thank you

Raz
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux