From: "Martin J. Bligh" <mbligh@aracnet.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] 6/6 cacheline align files_lock
Date: Fri, 07 Mar 2003 15:36:16 -0800 [thread overview]
Message-ID: <52550000.1047080176@flay> (raw)
I'm getting a lot of cacheline bounce from .text.lock.file_table due to
false sharing of the cahceline. The following patch just aligns the lock
in it's own cacheline.
only changes in profile under 50 ticks are:
-4832 -22.2% .text.lock.file_table
-6357 -12.8% default_idle
-10374 -6.2% total
Difference in results below (note system times as well as elapsed).
Kernbench: (make -j N vmlinux, where N = 2 x num_cpus)
Elapsed System User CPU
no-align 44.09 94.38 557.26 1477.00
align 44.38 94.18 558.00 1468.25
Kernbench: (make -j N vmlinux, where N = 16 x num_cpus)
Elapsed System User CPU
no-align 45.53 118.06 560.48 1489.50
align 44.84 111.77 560.63 1502.50
Kernbench: (make -j vmlinux, maximal tasks)
Elapsed System User CPU
no-align 45.17 117.80 560.62 1500.50
align 44.94 113.36 560.59 1500.00
diff -urpN -X /home/fletch/.diff.exclude 020-prof_docs/fs/file_table.c 030-align_files_lock/fs/file_table.c
--- 020-prof_docs/fs/file_table.c Tue Feb 25 23:03:49 2003
+++ 030-align_files_lock/fs/file_table.c Wed Mar 5 07:49:20 2003
@@ -27,7 +27,7 @@ static LIST_HEAD(anon_list);
/* And here the free ones sit */
static LIST_HEAD(free_list);
/* public *and* exported. Not pretty! */
-spinlock_t files_lock = SPIN_LOCK_UNLOCKED;
+spinlock_t files_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
/* Find an unused file structure and return a pointer to it.
* Returns NULL, if there are no more free file structures or
next reply other threads:[~2003-03-07 23:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-07 23:36 Martin J. Bligh [this message]
[not found] ` <20030308073535.B24272@infradead.org>
2003-03-08 15:41 ` Martin J. Bligh
2003-03-08 15:54 ` Christoph Hellwig
2003-03-08 16:10 ` Linus Torvalds
2003-03-08 18:10 ` Christoph Hellwig
2003-03-08 18:20 ` Linus Torvalds
2003-03-08 16:38 ` William Lee Irwin III
-- strict thread matches above, loose matches on Subject: below --
2003-03-05 17:23 [PATCH] 1/6 Share common physnode_map code between NUMA-Q and Summit Martin J. Bligh
2003-03-05 17:24 ` [PATCH] 2/6 Make CONFIG_NUMA work on non-numa machines Martin J. Bligh
2003-03-05 17:24 ` [PATCH] 3/6 Convert physnode_map to u8 Martin J. Bligh
2003-03-05 17:25 ` [PATCH] 4/6 Fix the type of get_zholes_size for NUMA-Q Martin J. Bligh
2003-03-05 17:26 ` [PATCH] 5/6 Provide basic documentation for profiling Martin J. Bligh
2003-03-05 17:27 ` [PATCH] 6/6 cacheline align files_lock Martin J. Bligh
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=52550000.1047080176@flay \
--to=mbligh@aracnet.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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®