From: Shaohua Li <shaohua.li@intel.com>
To: lkml <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@osdl.org>
Subject: [PATCH] less tlb flush in unmap_vmas
Date: Wed, 22 Mar 2006 10:38:08 +0800 [thread overview]
Message-ID: <1142995088.11430.34.camel@sli10-desk.sh.intel.com> (raw)
In unmaping region, if current task doesn't need reschedule, don't do a
tlb_finish_mmu. This can reduce some tlb flushes.
In the lmbench tests, this patch gives 2.1% improvement on exec proc
item and 4.2% on sh proc item.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
---
linux-2.6.16-rc5-root/mm/memory.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff -puN mm/memory.c~less_flush mm/memory.c
--- linux-2.6.16-rc5/mm/memory.c~less_flush 2006-03-21 07:22:47.000000000 +0800
+++ linux-2.6.16-rc5-root/mm/memory.c 2006-03-21 07:26:51.000000000 +0800
@@ -837,19 +837,18 @@ unsigned long unmap_vmas(struct mmu_gath
break;
}
- tlb_finish_mmu(*tlbp, tlb_start, start);
-
if (need_resched() ||
(i_mmap_lock && need_lockbreak(i_mmap_lock))) {
+ tlb_finish_mmu(*tlbp, tlb_start, start);
if (i_mmap_lock) {
*tlbp = NULL;
goto out;
}
cond_resched();
+ tlb_start_valid = 0;
+ *tlbp = tlb_gather_mmu(vma->vm_mm, fullmm);
}
- *tlbp = tlb_gather_mmu(vma->vm_mm, fullmm);
- tlb_start_valid = 0;
zap_work = ZAP_BLOCK_SIZE;
}
}
_
next reply other threads:[~2006-03-22 2:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-22 2:38 Shaohua Li [this message]
2006-03-22 4:52 ` Nick Piggin
2006-03-22 7:15 ` Chen, Kenneth W
2006-03-22 7:30 ` Nick Piggin
2006-03-22 7:44 ` Chen, Kenneth W
2006-03-22 10:13 ` Nick Piggin
2006-03-27 5:01 ` Lee Revell
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=1142995088.11430.34.camel@sli10-desk.sh.intel.com \
--to=shaohua.li@intel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®