mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Hemment <markhe@veritas.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCH] Align VM locks
Date: Thu, 16 Aug 2001 18:41:08 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.33.0108161839180.3340-100000@alloc.wat.veritas.com> (raw)

Hi,

  The patch below ensures the pagecache_lock and pagemap_lru_lock aren't
sharing an L1 cacheline with anyone else - espically each other!

Mark


diff -ur -X dontdiff linux-2.4.9-pre4/mm/filemap.c L1-2.4.9-pre4/mm/filemap.c
--- linux-2.4.9-pre4/mm/filemap.c	Thu Aug 16 15:57:51 2001
+++ L1-2.4.9-pre4/mm/filemap.c	Thu Aug 16 18:28:24 2001
@@ -45,12 +45,12 @@
 unsigned int page_hash_bits;
 struct page **page_hash_table;

-spinlock_t pagecache_lock = SPIN_LOCK_UNLOCKED;
+spinlock_t __cacheline_aligned pagecache_lock = SPIN_LOCK_UNLOCKED;
 /*
  * NOTE: to avoid deadlocking you must never acquire the pagecache_lock with
  *       the pagemap_lru_lock held.
  */
-spinlock_t pagemap_lru_lock = SPIN_LOCK_UNLOCKED;
+spinlock_t __cacheline_aligned pagemap_lru_lock = SPIN_LOCK_UNLOCKED;

 #define CLUSTER_PAGES		(1 << page_cluster)
 #define CLUSTER_OFFSET(x)	(((x) >> page_cluster) << page_cluster)


             reply	other threads:[~2001-08-16 17:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-16 17:41 Mark Hemment [this message]
2001-08-16 18:26 ` Andrea Arcangeli
2001-08-16 18:44   ` Mark Hemment
2001-08-16 18:52     ` Andrea Arcangeli
2001-08-16 18:57       ` Andrea Arcangeli
2001-08-16 19:46       ` Mark Hemment
2001-08-16 20:27         ` Ben LaHaise
2001-08-16 23:35           ` Andrea Arcangeli
2001-08-16 19:14   ` Andrew Morton
2001-08-16 23:33     ` Andrea Arcangeli

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=Pine.LNX.4.33.0108161839180.3340-100000@alloc.wat.veritas.com \
    --to=markhe@veritas.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®