From: Bart Van Assche <Bart.VanAssche@wdc.com>
To: "bigeasy@linutronix.de" <bigeasy@linutronix.de>
Cc: "daniel@bristot.me" <daniel@bristot.me>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"peterz@infradead.org" <peterz@infradead.org>,
"rostedt@goodmis.org" <rostedt@goodmis.org>,
"torvalds@linux-foundation.org" <torvalds@linux-foundation.org>,
"nab@linux-iscsi.org" <nab@linux-iscsi.org>,
"acme@kernel.org" <acme@kernel.org>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"williams@redhat.com" <williams@redhat.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"lclaudio@redhat.com" <lclaudio@redhat.com>,
"target-devel@vger.kernel.org" <target-devel@vger.kernel.org>,
"linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>
Subject: Re: [PATCH 2/2] target: remove spin_lock_assert() in __target_(attach|detach)_tg_pt_gp()
Date: Fri, 23 Mar 2018 17:55:54 +0000 [thread overview]
Message-ID: <1521827753.2535.18.camel@wdc.com> (raw)
In-Reply-To: <20180323175013.6uucllg5ogyzfovt@linutronix.de>
On Fri, 2018-03-23 at 18:50 +0100, bigeasy@linutronix.de wrote:
> On 2018-03-23 17:44:46 [+0000], Bart Van Assche wrote:
> > In other words, do we really need to remove these checks? I think that these
> > checks are useful as documentation to people who read the SCSI target code.
> > The target code is already hard to follow so I think any documentation,
> > especially documentation in the form of code that is checked at runtime, is
> > welcome.
>
> so if I remove those two and add a kernel doc comment instead, saying
> that the caller needs to ensure that "lun->lun_tg_pt_gp_lock" is held
> then we would remove the obvious runtime check and add a piece of
> documentation. Would that work?
Comments are not verified at runtime and hence can become outdated if the code
is modified. assert_spin_locked() and lockdep_assert_held() assertions however
are verified at runtime with the proper kernel configuration options enabled.
Hence my preference for assert_spin_locked()/lockdep_assert_held() over source
code comments.
Thanks,
Bart.
WARNING: multiple messages have this Message-ID (diff)
From: Bart Van Assche <Bart.VanAssche@wdc.com>
To: "bigeasy@linutronix.de" <bigeasy@linutronix.de>
Cc: "daniel@bristot.me" <daniel@bristot.me>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"peterz@infradead.org" <peterz@infradead.org>,
"rostedt@goodmis.org" <rostedt@goodmis.org>,
"torvalds@linux-foundation.org" <torvalds@linux-foundation.org>,
"nab@linux-iscsi.org" <nab@linux-iscsi.org>,
"acme@kernel.org" <acme@kernel.org>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"williams@redhat.com" <williams@redhat.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"lclaudio@redhat.com" <lclaudio@redhat.com>,
"target-devel@vger.kernel.org" <target-devel@vger.kernel.org>,
"linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>
Subject: Re: [PATCH 2/2] target: remove spin_lock_assert() in __target_(attach|detach)_tg_pt_gp()
Date: Fri, 23 Mar 2018 17:55:54 +0000 [thread overview]
Message-ID: <1521827753.2535.18.camel@wdc.com> (raw)
In-Reply-To: <20180323175013.6uucllg5ogyzfovt@linutronix.de>
T24gRnJpLCAyMDE4LTAzLTIzIGF0IDE4OjUwICswMTAwLCBiaWdlYXN5QGxpbnV0cm9uaXguZGUg
d3JvdGU6DQo+IE9uIDIwMTgtMDMtMjMgMTc6NDQ6NDYgWyswMDAwXSwgQmFydCBWYW4gQXNzY2hl
IHdyb3RlOg0KPiA+IEluIG90aGVyIHdvcmRzLCBkbyB3ZSByZWFsbHkgbmVlZCB0byByZW1vdmUg
dGhlc2UgY2hlY2tzPyBJIHRoaW5rIHRoYXQgdGhlc2UNCj4gPiBjaGVja3MgYXJlIHVzZWZ1bCBh
cyBkb2N1bWVudGF0aW9uIHRvIHBlb3BsZSB3aG8gcmVhZCB0aGUgU0NTSSB0YXJnZXQgY29kZS4N
Cj4gPiBUaGUgdGFyZ2V0IGNvZGUgaXMgYWxyZWFkeSBoYXJkIHRvIGZvbGxvdyBzbyBJIHRoaW5r
I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atom feed top
2018-03-21 15:38 [PATCH] target: Use WARNON_NON_RT(!irqs_disabled()) Arnaldo Carvalho de Melo
2018-03-21 15:38 ` Arnaldo Carvalho de Melo
2018-03-21 15:38 ` Arnaldo Carvalho de Melo
2018-03-21 18:43 ` Linus Torvalds
2018-03-21 18:43 ` Linus Torvalds
2018-03-22 9:13 ` Thomas Gleixner
2018-03-22 9:13 ` Thomas Gleixner
2018-03-22 9:37 ` Arnaldo Carvalho de Melo
2018-03-22 9:37 ` Arnaldo Carvalho de Melo
2018-03-22 9:40 ` Arnaldo Carvalho de Melo
2018-03-22 9:40 ` Arnaldo Carvalho de Melo
2018-03-22 9:47 ` Thomas Gleixner
2018-03-22 9:47 ` Thomas Gleixner
2018-03-23 15:55 ` Sebastian Andrzej Siewior
2018-03-23 15:55 ` Sebastian Andrzej Siewior
2018-03-23 16:25 ` Bart Van Assche
2018-03-23 16:25 ` Bart Van Assche
2018-03-23 16:33 ` bigeasy
2018-03-23 16:33 ` bigeasy
2018-03-23 16:37 ` Linus Torvalds
2018-03-23 16:37 ` Linus Torvalds
2018-03-23 17:17 ` [PATCH 1/2] target: drop spin_lock_assert() + irqs_disabled() combo checks bigeasy
2018-03-23 17:17 ` bigeasy
2018-03-23 17:19 ` [PATCH 2/2] target: remove spin_lock_assert() in __target_(attach|detach)_tg_pt_gp() bigeasy
2018-03-23 17:19 ` bigeasy
2018-03-23 17:44 ` Bart Van Assche
2018-03-23 17:44 ` Bart Van Assche
2018-03-23 17:50 ` bigeasy
2018-03-23 17:50 ` bigeasy
2018-03-23 17:55 ` Bart Van Assche [this message]
2018-03-23 17:55 ` Bart Van Assche
2018-03-26 15:38 ` Steven Rostedt
2018-03-26 15:38 ` Steven Rostedt
2018-03-23 17:36 ` [PATCH 1/2 v2] target: drop spin_lock_assert() + irqs_disabled() combo checks Sebastian Andrzej Siewior
2018-03-23 17:36 ` Sebastian Andrzej Siewior
2018-03-23 17:47 ` Bart Van Assche
2018-03-23 17:47 ` Bart Van Assche
2018-03-26 15:13 ` [PATCH 1/2] " Steven Rostedt
2018-03-26 15:13 ` Steven Rostedt
2018-03-28 10:15 ` bigeasy
2018-03-28 10:15 ` bigeasy
2018-03-28 15:05 ` Bart Van Assche
2018-03-28 15:05 ` Bart Van Assche
2018-03-28 15:14 ` bigeasy
2018-03-28 15:14 ` bigeasy
2018-03-28 15:31 ` Bart Van Assche
2018-03-28 15:31 ` Bart Van Assche
2018-05-28 14:35 ` bigeasy
2018-05-28 14:35 ` bigeasy
2018-06-04 7:02 ` Bart Van Assche
2018-06-04 7:02 ` Bart Van Assche
2018-06-04 7:16 ` bigeasy
2018-06-04 7:16 ` bigeasy
2018-03-26 14:21 ` [PATCH] target: Use WARNON_NON_RT(!irqs_disabled()) Arnaldo Carvalho de Melo
2018-03-26 14:21 ` Arnaldo Carvalho de Melo
2018-03-21 18:50 ` Christoph Hellwig
2018-03-21 18:50 ` Christoph Hellwig
2018-03-21 19:01 ` Steven Rostedt
2018-03-21 19:01 ` Steven Rostedt
2018-03-22 10:25 ` kbuild test robot
2018-03-22 10:25 ` kbuild test robot
2018-03-22 10:45 ` kbuild test robot
2018-03-22 10:45 ` kbuild test robot
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=1521827753.2535.18.camel@wdc.com \
--to=bart.vanassche@wdc.com \
--cc=acme@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=daniel@bristot.me \
--cc=lclaudio@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@linux-iscsi.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=target-devel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=williams@redhat.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 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.