mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ray Bryant <raybry@sgi.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Ray Bryant <raybry@sgi.com>, John Hawkes <hawkes@sgi.com>,
	Ray Bryant <raybry@austin.rr.com>,
	linux-kernel@vger.kernel.org, lse-tech@lists.sourceforge.net
Subject: [PATCH 1/1] lockmeter: lockmeter-lockmeter-fix-for-generic_read_trylock.patch
Date: Thu, 7 Oct 2004 11:26:12 -0700 (PDT)	[thread overview]
Message-ID: <20041007182612.30713.16318.72016@tomahawk.engr.sgi.com> (raw)

Andrew,

The patch in the mm tree named: lockmeter-lockmeter-fix-for-generic_read_trylock.patch
is incorrect.  It should be as shown be replaced by this patch.  (generic_raw_read_trylock()
should be a copy of what is in kernel/spinlock.c and should not call _metered_read_lock()).

The incorrect patch breaks lockmeter on any platform that uses generic_raw_read_trylock().
(This is part of the problem with lockmeter for Altix.)

(Thanks to John Hawkes for finding this.)

From: Ray Bryant <raybry@sgi.com>

Update lockmeter.c with generic_raw_read_trylock fix.

Signed-off-by: Ray Bryant <raybry@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/kernel/lockmeter.c |   12 ++++++++++++
 1 files changed, 12 insertions(+)

diff -puN kernel/lockmeter.c~lockmeter-lockmeter-fix-for-generic_read_trylock kernel/lockmeter.c
--- 25/kernel/lockmeter.c~lockmeter-lockmeter-fix-for-generic_read_trylock	2004-09-16 21:32:25.175963856 -0700
+++ 25-akpm/kernel/lockmeter.c	2004-09-16 21:32:25.180963096 -0700
@@ -1213,6 +1213,18 @@ __read_lock_failed: \
  * except for the fact tht calls to _raw_ routines are replaced by
  * corresponding calls to the _metered_ routines
  */
+
+/*
+ * Generic declaration of the raw read_trylock() function,
+ * architectures are supposed to optimize this:
+ */
+int __lockfunc generic_raw_read_trylock(rwlock_t *lock)
+{
+	_raw_read_lock(lock);
+	return 1;
+}
+EXPORT_SYMBOL(generic_raw_read_trylock);
+
 int __lockfunc _spin_trylock(spinlock_t *lock)
 {
 	preempt_disable();
_

-- 
Best Regards,
Ray
-----------------------------------------------
Ray Bryant                       raybry@sgi.com
The box said: "Requires Windows 98 or better",
           so I installed Linux.
-----------------------------------------------

                 reply	other threads:[~2004-10-08  3:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20041007182612.30713.16318.72016@tomahawk.engr.sgi.com \
    --to=raybry@sgi.com \
    --cc=akpm@osdl.org \
    --cc=hawkes@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lse-tech@lists.sourceforge.net \
    --cc=raybry@austin.rr.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®