All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fengguang Wu <wfg@mail.ustc.edu.cn>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2/6] readahead: min/max sizes: remove get_readahead_bounds()
Date: Sat, 06 Jan 2007 15:26:28 +0800	[thread overview]
Message-ID: <368068420.92201@ustc.edu.cn> (raw)
Message-ID: <20070106072729.598977589@mail.ustc.edu.cn> (raw)
In-Reply-To: 20070106072626.911640026@mail.ustc.edu.cn

[-- Attachment #1: readahead-min-max-sizes-remove-get_readahead_bounds.patch --]
[-- Type: text/plain, Size: 1283 bytes --]

Remove get_readahead_bounds():
- ra_max: we already have get_max_readahead() for it
- ra_min: is only used by context based readahead, and will be moved there
          and set to a more reasonable value

Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn>

---
 mm/readahead.c |   24 ------------------------
 1 file changed, 24 deletions(-)

--- linux-2.6.20-rc3-mm1.orig/mm/readahead.c
+++ linux-2.6.20-rc3-mm1/mm/readahead.c
@@ -780,30 +780,6 @@ out:
 	return nr_pages;
 }
 
-/*
- * ra_min is mainly determined by the size of cache memory. Reasonable?
- *
- * Table of concrete numbers for 4KB page size:
- *   inactive + free (MB):    4   8   16   32   64  128  256  512 1024
- *            ra_min (KB):   16  16   16   16   20   24   32   48   64
- */
-static inline void get_readahead_bounds(struct file_ra_state *ra,
-					unsigned long *ra_min,
-					unsigned long *ra_max)
-{
-	unsigned long active;
-	unsigned long inactive;
-	unsigned long free;
-
-	__get_zone_counts(&active, &inactive, &free, NODE_DATA(numa_node_id()));
-
-	free += inactive;
-	*ra_max = min(min(ra->ra_pages, 0xFFFFUL), free / 2);
-	*ra_min = min(min(MIN_RA_PAGES + (free >> 14),
-			  DIV_ROUND_UP(64*1024, PAGE_CACHE_SIZE)),
-			  *ra_max / 8);
-}
-
 #endif /* CONFIG_ADAPTIVE_READAHEAD */
 
 /*

--

  parent reply	other threads:[~2007-01-06  7:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-06  7:26 [PATCH 0/6] adaptive readahead update Fengguang Wu
2007-01-06  7:26 ` Fengguang Wu
2007-01-06  7:26 ` [PATCH 1/6] readahead: sysctl parameters: set readahead_hit_rate=1 Fengguang Wu
2007-01-06  7:26   ` Fengguang Wu
2007-01-06  7:26 ` Fengguang Wu [this message]
2007-01-06  7:26   ` [PATCH 2/6] readahead: min/max sizes: remove get_readahead_bounds() Fengguang Wu
2007-01-06  7:26 ` [PATCH 3/6] readahead: context based method: update ra_min Fengguang Wu
2007-01-06  7:26   ` Fengguang Wu
2007-01-06  7:26 ` [PATCH 4/6] readahead: context based method: remove readahead_ratio Fengguang Wu
2007-01-06  7:26   ` Fengguang Wu
2007-01-06  7:26 ` [PATCH 5/6] readahead: call scheme: remove get_readahead_bounds() Fengguang Wu
2007-01-06  7:26   ` Fengguang Wu
2007-01-06  7:26 ` [PATCH 6/6] readahead: nfsd case: remove ra_min Fengguang Wu
2007-01-06  7:26   ` Fengguang Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=368068420.92201@ustc.edu.cn \
    --to=wfg@mail.ustc.edu.cn \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.