lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 8 Mar 2007 18:25:50 +0800
From:	Fengguang Wu <fengguang.wu@...il.com>
To:	Ram Pai <linuxram@...ibm.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Suparna Bhattacharya <suparna@...ibm.com>,
	John Tran <jbtran@...ibm.com>,
	Mike Sullivan <mksully@...ibm.com>,
	Chris Mason <mason@...e.com>,
	Steven Pratt <slpratt@...tin.ibm.com>,
	Badari Pulavarty <badari@...ibm.com>,
	Mingming Cao <mcao@...ibm.com>,
	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -mm] readahead: partial sendfile fix

Ram Pai,

Sorry for the long delay, I was just back from the winter vacation.

On Mon, Feb 12, 2007 at 11:49:10AM -0800, Ram Pai wrote:
> The solution you proposed seems kludgy to me. If you determine that the

I dislike it, either.

> its a restarted aio, then start reading from where readahead had left
> reading from earlier. To me a simple fix is:
> 
> -       if (unlikely(aio_restarted()))
> -               next_index = last_index; /* Avoid repeat readahead */
> 
> +       if (unlikely(aio_restarted()))
> +  		next_index = min(prev_index+1, last_index);
> 
> 
> No? 

Can be even simpler, if we _only_ want to fix the aio case:

+       if (unlikely(aio_restarted()))
+               next_index = prev_index + 1;

Regards,
Wu
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ