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>] [day] [month] [year] [list]
Message-ID: <20070411061540.GA5890@mail.ustc.edu.cn>
Date:	Wed, 11 Apr 2007 14:15:40 +0800
From:	Fengguang Wu <wfg@...l.ustc.edu.cn>
To:	Jin Steve <shjjiejin@...mail.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: Doc for your Adaptive ReadAhead patch

On Wed, Apr 11, 2007 at 04:44:34AM +0000, Jin Steve wrote:
> Just like the function check_ra_success: (Does it mean: last time 
> RA>VM_MAX_CACHE_HIT, so next time no need readahead?)

The cache hit logic is to prevent doing pointless readahead for
an already cached file: the pages are already there.

VM_MAX_CACHE_HIT is the threshold to disable readahead in this case.

> static inline int check_ra_success(struct file_ra_state *ra,
> 			unsigned long nr_to_read, unsigned long actual)
> {
> 	if (actual == 0) {
> 		ra->cache_hit += nr_to_read;
> 		if (ra->cache_hit >= VM_MAX_CACHE_HIT) {
> 			ra_off(ra);
> 			ra->flags |= RA_FLAG_INCACHE;
> 			return 0;
> 		}
> 	} else {
> 		ra->cache_hit=0;
> 	}
> 	return 1;
> }
-
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