Re: md/raid1:!conf->r1buf_pool is unlikely in function sync_request.

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

 



On Wed, 28 Mar 2012 19:24:29 +0800 "majianpeng" <majianpeng@xxxxxxxxx> wrote:

> >From 7f9446682f64e28106dd52cd12bdf74a19fb4015 Mon Sep 17 00:00:00 2001
> From: majianpeng <majianpeng@xxxxxxxxx>
> Date: Wed, 28 Mar 2012 19:20:07 +0800
> Subject: [PATCH] md/raid1:!conf->r1buf_pool is unlikely in function
>  sync_request.
> 
> 
> Signed-off-by: majianpeng <majianpeng@xxxxxxxxx>
> ---
>  drivers/md/raid1.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
> index 4a40a20..943b3b3 100644
> --- a/drivers/md/raid1.c
> +++ b/drivers/md/raid1.c
> @@ -2246,7 +2246,7 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr, int *skipp
>  	int good_sectors = RESYNC_SECTORS;
>  	int min_bad = 0; /* number of sectors that are bad in all devices */
>  
> -	if (!conf->r1buf_pool)
> +	if (unlikely(!conf->r1buf_pool))
>  		if (init_resync(conf))
>  			return 0;
>  

Hi,
 I'm really happy that you are reviewing the md patches and even finding some
 bugs.  However I find the stream of occasional tiny patches somewhat
 distracting.

 Also I find micro-optimisation like this fairly pointless.  You should only
 really use unlikely() when it will make a real difference to performance,
 and this change won't

 So I won't apply this patch.
 I'll keep looking though the others you have sent since but in future I
 would prefer it if you collected together little patches like this and send
 them as a group.

 If and when you find genuine bugs, feel free to send them straight away.

Thanks,
NeilBrown

Attachment: signature.asc
Description: PGP signature


[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