All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, Borislav Petkov <bp@suse.de>,
	David Rientjes <rientjes@google.com>,
	Michal Hocko <mhocko@suse.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] lockdep: Show address of "struct lockdep_map" at print_lock().
Date: Mon, 26 Mar 2018 18:05:49 +0200	[thread overview]
Message-ID: <20180326160549.GL4043@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <1522059513-5461-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp>

On Mon, Mar 26, 2018 at 07:18:33PM +0900, Tetsuo Handa wrote:
> [  628.863629] 2 locks held by a.out/1165:
> [  628.867533]  #0: [ffffa3b438472e48] (&mm->mmap_sem){++++}, at: __do_page_fault+0x16f/0x4d0
> [  628.873570]  #1: [ffffa3b4f2c52ac0] (&mapping->i_mmap_rwsem){++++}, at: rmap_walk_file+0x1d9/0x2a0

Maybe change the string a little, because from the above it's not at all
effident that the [] thing is the lock instance.

> diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
> index 12a2805..7835233 100644
> --- a/kernel/locking/lockdep.c
> +++ b/kernel/locking/lockdep.c
> @@ -556,9 +556,9 @@ static void print_lock(struct held_lock *hlock)
>  		return;
>  	}
>  
> +	printk(KERN_CONT "[%px]", hlock->instance);

And yeah, what Michal said, that wants to be %p, we're fine with the
thing being hashed, all we want to do is equivalience, which can be done
with hashed pinters too.

>  	print_lock_name(lock_classes + class_idx - 1);
> -	printk(KERN_CONT ", at: [<%px>] %pS\n",
> -		(void *)hlock->acquire_ip, (void *)hlock->acquire_ip);
> +	printk(KERN_CONT ", at: %pS\n", (void *)hlock->acquire_ip);
>  }

Otherwise no real objection to the patch.

  parent reply	other threads:[~2018-03-26 16:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-26 10:18 [PATCH] lockdep: Show address of "struct lockdep_map" at print_lock() Tetsuo Handa
2018-03-26 13:19 ` Michal Hocko
2018-03-26 13:20   ` Michal Hocko
2018-03-26 16:05 ` Peter Zijlstra [this message]
2018-03-26 20:58   ` Tetsuo Handa
2018-03-27 10:41     ` [PATCH v2] " Tetsuo Handa
2018-03-27 10:50       ` Michal Hocko
2018-03-27 20:23       ` David Rientjes
2018-03-29 10:26       ` Tetsuo Handa
2018-03-29 12:01         ` Peter Zijlstra
2018-03-29 12:45       ` [tip:locking/core] lockdep: Make the lock debug output more useful tip-bot for Tetsuo Handa

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=20180326160549.GL4043@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bp@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=mingo@redhat.com \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=rientjes@google.com \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.