From: Ulrich Kunitz <gefm21@uumail.de>
To: linux-kernel@vger.kernel.org, linux-mm@vger.kernel.org
Subject: [PATCH] tiny MM performance and typo patches for 2.4.2
Date: Sun, 4 Mar 2001 22:49:51 +0100 [thread overview]
Message-ID: <20010304224951.B1979@uumail.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 888 bytes --]
Hi folks,
this is a list of patches I collected while looking at the memory
management sources. Two patches might improve the performance of your
box. The others are more or less cosmetic.
This mail is sent with a kernel using these patches.
Here is a list sorted with decreasing importance:
patch-uk2 makes use of the pgd, pmd and pte quicklists for x86 too;
risky: there might be a reason that 2.4.x doesn't use the
quicklists.
patch-uk6 In 2.4.x _page_hashfn divides struct address_space pointer
with a parameter derived from the size of struct
inode. Deriving this parameter from the size of struct
address_space makes more sense -- at least for me.
patch-uk5 cleans the bd_flush_param union.
patch-uk1 fixes a comment typo in asm-i386/highmem.h.
patch-uk3 fixes a comment typo in asm-i386/pgtable-3level.h.
Ciao,
Uli Kunitz
--
Ulrich Kunitz (gefm21@uumail.de)
[-- Attachment #2: patch-uk2 --]
[-- Type: text/plain, Size: 880 bytes --]
--- linux-2.4.2/include/asm-i386/pgalloc.h Thu Feb 22 01:09:57 2001
+++ linux/include/asm-i386/pgalloc.h Sun Mar 4 20:14:50 2001
@@ -92,9 +92,9 @@
free_page((unsigned long)pte);
}
-#define pte_free_kernel(pte) free_pte_slow(pte)
-#define pte_free(pte) free_pte_slow(pte)
-#define pgd_free(pgd) free_pgd_slow(pgd)
+#define pte_free_kernel(pte) free_pte_fast(pte)
+#define pte_free(pte) free_pte_fast(pte)
+#define pgd_free(pgd) free_pgd_fast(pgd)
#define pgd_alloc() get_pgd_fast()
extern inline pte_t * pte_alloc_kernel(pmd_t * pmd, unsigned long address)
@@ -145,7 +145,7 @@
* inside the pgd, so has no extra memory associated with it.
* (In the PAE case we free the page.)
*/
-#define pmd_free(pmd) free_pmd_slow(pmd)
+#define pmd_free(pmd) free_pmd_fast(pmd)
#define pmd_free_kernel pmd_free
#define pmd_alloc_kernel pmd_alloc
[-- Attachment #3: patch-uk6 --]
[-- Type: text/plain, Size: 547 bytes --]
--- linux-2.4.2/include/linux/pagemap.h Thu Feb 22 01:10:01 2001
+++ linux/include/linux/pagemap.h Sun Mar 4 20:14:50 2001
@@ -58,7 +58,8 @@
*/
extern inline unsigned long _page_hashfn(struct address_space * mapping, unsigned long index)
{
-#define i (((unsigned long) mapping)/(sizeof(struct inode) & ~ (sizeof(struct inode) - 1)))
+#define i (((unsigned long) mapping) / \
+ (sizeof(struct address_space) & ~ (sizeof(struct address_space) - 1)))
#define s(x) ((x)+((x)>>PAGE_HASH_BITS))
return s(i+index) & (PAGE_HASH_SIZE-1);
#undef i
[-- Attachment #4: patch-uk5 --]
[-- Type: text/plain, Size: 1090 bytes --]
--- linux-2.4.2/fs/buffer.c Fri Feb 9 20:29:44 2001
+++ linux/fs/buffer.c Sun Mar 4 19:27:31 2001
@@ -112,19 +112,18 @@
*/
union bdflush_param {
struct {
- int nfract; /* Percentage of buffer cache dirty to
- activate bdflush */
- int ndirty; /* Maximum number of dirty blocks to write out per
+ int nfract; /* Percentage of buffer cache dirty to
+ activate bdflush */
+ int ndirty; /* Maximum number of dirty blocks to write out per
wake-cycle */
- int nrefill; /* Number of clean buffers to try to obtain
- each time we call refill */
int dummy1; /* unused */
+ int dummy2; /* unused */
int interval; /* jiffies delay between kupdate flushes */
int age_buffer; /* Time for normal buffer to age before we flush it */
int nfract_sync; /* Percentage of buffer cache dirty to
activate bdflush synchronously */
- int dummy2; /* unused */
- int dummy3; /* unused */
+ int dummy3; /* unused */
+ int dummy4; /* unused */
} b_un;
unsigned int data[N_PARAM];
} bdf_prm = {{30, 64, 64, 256, 5*HZ, 30*HZ, 60, 0, 0}};
[-- Attachment #5: patch-uk1 --]
[-- Type: text/plain, Size: 447 bytes --]
--- linux-2.4.2/include/asm-i386/highmem.h Thu Feb 22 01:09:58 2001
+++ linux/include/asm-i386/highmem.h Sun Mar 4 20:14:50 2001
@@ -9,7 +9,7 @@
*
*
* Redesigned the x86 32-bit VM architecture to deal with
- * up to 16 Terrabyte physical memory. With current x86 CPUs
+ * up to 16 Terabyte physical memory. With current x86 CPUs
* we now support up to 64 Gigabytes physical RAM.
*
* Copyright (C) 1999 Ingo Molnar <mingo@redhat.com>
[-- Attachment #6: patch-uk3 --]
[-- Type: text/plain, Size: 578 bytes --]
--- linux-2.4.2/include/asm-i386/pgtable-3level.h Wed Oct 18 23:25:46 2000
+++ linux/include/asm-i386/pgtable-3level.h Sun Mar 4 19:25:00 2001
@@ -48,7 +48,7 @@
/* Rules for using set_pte: the pte being assigned *must* be
* either not present or in a state where the hardware will
* not attempt to update the pte. In places where this is
- * not possible, use pte_get_and_clear to obtain the old pte
+ * not possible, use ptep_get_and_clear to obtain the old pte
* value and then use set_pte to update it. -ben
*/
static inline void set_pte(pte_t *ptep, pte_t pte)
next reply other threads:[~2001-03-04 21:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-04 21:49 Ulrich Kunitz [this message]
2001-03-04 21:55 ` [PATCH] tiny MM performance and typo patches for 2.4.2 David S. Miller
2001-03-05 0:29 ` Rik van Riel
2001-03-05 7:25 ` Mike Galbraith
2001-03-05 14:20 ` Rik van Riel
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=20010304224951.B1979@uumail.de \
--to=gefm21@uumail.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).