mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Waiman Long <longman@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>, Will Deacon <will.deacon@arm.com>
Cc: linux-kernel@vger.kernel.org,
	Bart Van Assche <bvanassche@acm.org>,
	Waiman Long <longman@redhat.com>
Subject: [PATCH-tip 0/3] locking/lockdep: Cleaning up lockdep code
Date: Wed, 12 Feb 2020 10:38:25 -0500	[thread overview]
Message-ID: <20200212153828.346-1-longman@redhat.com> (raw)

The following conditional compilation macros are used throughout the
lockdep code making it hard to understand.
 - CONFIG_PROVE_LOCKING
 - CONFIG_LOCK_STAT
 - CONFIG_DEBUG_LOCKDEP
 - CONFIG_LOCKDEP_SMALL
 - CONFIG_TRACE_IRQFLAGS

In particular, almost half of the code is for CONFIG_PROVE_LOCKING and
there are several blocks of them in lockdep.c. It is very hard to see if
a function is for CONFIG_PROVE_LOCKING or not.

This patchset cleans up this mess by putting all the CONFIG_PROVE_LOCKING
functions into a separate lockdep_prove.c file making it easier to know
what they are for. It also consolidates the CONFIG_DEBUG_LOCKDEP code
to a certain extend.

This is a code relocation patchset. There is no functional change.

Waiman Long (3):
  locking/lockdep: Make remove_class_from_lock_chains() depend on
    CONFIG_PROVE_LOCKING
  locking/lockdep: Extract CONFIG_PROVE_LOCKING code out to
    lockdep_prove.c
  locking/lockdep: Consolidate CONFIG_DEBUG_LOCKDEP code

 kernel/locking/lockdep.c       | 3300 +++-----------------------------
 kernel/locking/lockdep_prove.c | 2820 +++++++++++++++++++++++++++
 2 files changed, 3066 insertions(+), 3054 deletions(-)
 create mode 100644 kernel/locking/lockdep_prove.c

-- 
2.18.1


             reply	other threads:[~2020-02-12 15:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12 15:38 Waiman Long [this message]
2020-02-12 15:38 ` [PATCH-tip 1/3] locking/lockdep: Make remove_class_from_lock_chains() depend on CONFIG_PROVE_LOCKING Waiman Long
2020-02-12 15:38 ` [PATCH-tip 2/3] locking/lockdep: Extract CONFIG_PROVE_LOCKING code out to lockdep_prove.c Waiman Long
2020-02-12 15:38 ` [PATCH-tip 3/3] locking/lockdep: Consolidate CONFIG_DEBUG_LOCKDEP code Waiman Long

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=20200212153828.346-1-longman@redhat.com \
    --to=longman@redhat.com \
    --cc=bvanassche@acm.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=will.deacon@arm.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

Powered by JetHome