Re: [RFQ] make witness panic an option

2012-11-25 Thread Adrian Chadd
The reason I haven't yet committed it is I'd like to sit down with Attilio one-on-one and figure out the _right_ way to do this. There's a time for shit-stirring and a time for getting stuff done; this is neither of those times. I don't mind taking my time on this one. Adrian __

Re: [RFQ] make witness panic an option

2012-11-25 Thread Attilio Rao
On Sun, Nov 25, 2012 at 1:12 PM, Pawel Jakub Dawidek wrote: > On Sun, Nov 25, 2012 at 12:42:16PM +, Attilio Rao wrote: >> On Sun, Nov 25, 2012 at 12:39 PM, Pawel Jakub Dawidek >> wrote: >> > WITNESS is a development tool. We don't ship production kernels with >> > WITNESS even compiled in. W

Re: [RFQ] make witness panic an option

2012-11-25 Thread Attilio Rao
On Sun, Nov 25, 2012 at 2:06 PM, Pawel Jakub Dawidek wrote: > On Sun, Nov 25, 2012 at 01:48:23PM +, Attilio Rao wrote: >> On Sun, Nov 25, 2012 at 1:47 PM, Pawel Jakub Dawidek >> wrote: >> > On Sun, Nov 25, 2012 at 01:37:19PM +, Attilio Rao wrote: >> >> On Sun, Nov 25, 2012 at 1:12 PM, Pa

Re: [RFQ] make witness panic an option

2012-11-25 Thread Pawel Jakub Dawidek
On Sun, Nov 25, 2012 at 01:48:23PM +, Attilio Rao wrote: > On Sun, Nov 25, 2012 at 1:47 PM, Pawel Jakub Dawidek wrote: > > On Sun, Nov 25, 2012 at 01:37:19PM +, Attilio Rao wrote: > >> On Sun, Nov 25, 2012 at 1:12 PM, Pawel Jakub Dawidek > >> wrote: > >> > On Sun, Nov 25, 2012 at 12:42:1

Re: [RFQ] make witness panic an option

2012-11-25 Thread Attilio Rao
On Sun, Nov 25, 2012 at 1:47 PM, Pawel Jakub Dawidek wrote: > On Sun, Nov 25, 2012 at 01:37:19PM +, Attilio Rao wrote: >> On Sun, Nov 25, 2012 at 1:12 PM, Pawel Jakub Dawidek >> wrote: >> > On Sun, Nov 25, 2012 at 12:42:16PM +, Attilio Rao wrote: >> >> On Sun, Nov 25, 2012 at 12:39 PM, P

Re: [RFQ] make witness panic an option

2012-11-25 Thread Pawel Jakub Dawidek
On Sun, Nov 25, 2012 at 01:37:19PM +, Attilio Rao wrote: > On Sun, Nov 25, 2012 at 1:12 PM, Pawel Jakub Dawidek wrote: > > On Sun, Nov 25, 2012 at 12:42:16PM +, Attilio Rao wrote: > >> On Sun, Nov 25, 2012 at 12:39 PM, Pawel Jakub Dawidek > >> wrote: > >> > WITNESS is a development tool.

Re: [RFQ] make witness panic an option

2012-11-25 Thread Attilio Rao
On Sun, Nov 25, 2012 at 1:12 PM, Pawel Jakub Dawidek wrote: > On Sun, Nov 25, 2012 at 12:42:16PM +, Attilio Rao wrote: >> On Sun, Nov 25, 2012 at 12:39 PM, Pawel Jakub Dawidek >> wrote: >> > WITNESS is a development tool. We don't ship production kernels with >> > WITNESS even compiled in. W

Re: [RFQ] make witness panic an option

2012-11-25 Thread Pawel Jakub Dawidek
On Sun, Nov 25, 2012 at 12:42:16PM +, Attilio Rao wrote: > On Sun, Nov 25, 2012 at 12:39 PM, Pawel Jakub Dawidek > wrote: > > WITNESS is a development tool. We don't ship production kernels with > > WITNESS even compiled in. What is more efficient use of developer time: > > going through full

Re: [RFQ] make witness panic an option

2012-11-25 Thread Attilio Rao
On Sun, Nov 25, 2012 at 12:39 PM, Pawel Jakub Dawidek wrote: > On Thu, Nov 15, 2012 at 04:39:55PM +, Attilio Rao wrote: >> On 11/15/12, Adrian Chadd wrote: >> > On 15 November 2012 05:27, Giovanni Trematerra >> > wrote: >> > >> >> I really do think that is a very bad idea. >> >> When a locki

Re: [RFQ] make witness panic an option

2012-11-25 Thread Pawel Jakub Dawidek
On Thu, Nov 15, 2012 at 04:39:55PM +, Attilio Rao wrote: > On 11/15/12, Adrian Chadd wrote: > > On 15 November 2012 05:27, Giovanni Trematerra > > wrote: > > > >> I really do think that is a very bad idea. > >> When a locking assertion fails you have just to stop your mind and > >> think what

Re: [RFQ] make witness panic an option

2012-11-16 Thread Alfred Perlstein
On 11/16/12 10:18 AM, Adrian Chadd wrote: On 16 November 2012 00:26, Alfred Perlstein wrote: Adding another option to tag asserts so that it was sort of like: KASSERT((cond, section, "string")); would be interesting, then you could turn KASSERTS on based on "vfs" or possibly file by file. Th

Re: [RFQ] make witness panic an option

2012-11-16 Thread Adrian Chadd
On 16 November 2012 00:26, Alfred Perlstein wrote: > Adding another option to tag asserts so that it was sort of like: > > KASSERT((cond, section, "string")); would be interesting, then you could > turn KASSERTS on based on "vfs" or possibly file by file. That's orthogonal to my developer-focuse

Re: [RFQ] make witness panic an option

2012-11-16 Thread Attilio Rao
On Fri, Nov 16, 2012 at 7:19 AM, Andriy Gapon wrote: > on 16/11/2012 01:38 Attilio Rao said the following: >> On Thu, Nov 15, 2012 at 8:51 PM, Andriy Gapon wrote: >>> on 15/11/2012 22:00 Adrian Chadd said the following: But I think my change is invaluable for development, where you want to >

Re: [RFQ] make witness panic an option

2012-11-16 Thread Alfred Perlstein
On 11/15/12 11:22 PM, Andriy Gapon wrote: on 16/11/2012 01:20 Alfred Perlstein said the following: We need to enable developers to skip these areas and test their own code. I wish that there was a magic knob to ignore build breakages, so that the developers could test how their own code compile

Re: [RFQ] make witness panic an option

2012-11-15 Thread Andriy Gapon
on 16/11/2012 01:20 Alfred Perlstein said the following: > We need to enable developers to skip these areas and test their own code. I wish that there was a magic knob to ignore build breakages, so that the developers could test how their own code compiles :-) On a serious note, why stop here? E

Re: [RFQ] make witness panic an option

2012-11-15 Thread Andriy Gapon
on 16/11/2012 01:38 Attilio Rao said the following: > On Thu, Nov 15, 2012 at 8:51 PM, Andriy Gapon wrote: >> on 15/11/2012 22:00 Adrian Chadd said the following: >>> But I think my change is invaluable for development, where you want to >>> improve and debug the locking and lock interactions of a

Re: [RFQ] make witness panic an option

2012-11-15 Thread Attilio Rao
On Thu, Nov 15, 2012 at 8:51 PM, Andriy Gapon wrote: > on 15/11/2012 22:00 Adrian Chadd said the following: >> But I think my change is invaluable for development, where you want to >> improve and debug the locking and lock interactions of a subsystem. > > My practical experience was that if you m

Re: [RFQ] make witness panic an option

2012-11-15 Thread Alfred Perlstein
On 11/15/12 12:51 PM, Andriy Gapon wrote: on 15/11/2012 22:00 Adrian Chadd said the following: But I think my change is invaluable for development, where you want to improve and debug the locking and lock interactions of a subsystem. My practical experience was that if you mess up one lock in o

Re: [RFQ] make witness panic an option

2012-11-15 Thread Alfred Perlstein
On 11/14/12 10:15 PM, Adrian Chadd wrote: Hi all, When debugging and writing wireless drivers/stack code, I like to sprinkle lots of locking assertions everywhere. However, this does cause things to panic quite often during active development. This patch (against stable/9) makes the actual pani

Re: [RFQ] make witness panic an option

2012-11-15 Thread Andriy Gapon
on 15/11/2012 22:00 Adrian Chadd said the following: > But I think my change is invaluable for development, where you want to > improve and debug the locking and lock interactions of a subsystem. My practical experience was that if you mess up one lock in one place, then it is a total mess further

Re: [RFQ] make witness panic an option

2012-11-15 Thread Adrian Chadd
On 15 November 2012 11:55, Ian Lepore wrote: > Since you've made it abundantly clear in this thread that you are not > open to anyone else's opinion and won't change your mind, I'm not going > to waste even 10 seconds explaining my perfectly valid needs. > > I'll just keep hacking the code up to

Re: [RFQ] make witness panic an option

2012-11-15 Thread Ian Lepore
On Thu, 2012-11-15 at 17:47 +, Attilio Rao wrote: > On 11/15/12, Ian Lepore wrote: > > On Wed, 2012-11-14 at 22:15 -0800, Adrian Chadd wrote: > >> Hi all, > >> > >> When debugging and writing wireless drivers/stack code, I like to > >> sprinkle lots of locking assertions everywhere. However, t

Re: [RFQ] make witness panic an option

2012-11-15 Thread Andriy Gapon
on 15/11/2012 19:56 Warner Losh said the following: > It sounds like he's more worried about introducing LoRs into his wireless > code. "Mere" LORs do not result in panic, by default. Only more serious lock-related issues lead to panics. -- Andriy Gapon _

Re: [RFQ] make witness panic an option

2012-11-15 Thread Attilio Rao
On 11/15/12, Adrian Chadd wrote: > On 15 November 2012 10:01, Attilio Rao wrote: >> I think that your worries are focused more around the latter than the >> former, which can be easilly shut down already today. >> >> And frankly I will never be in favor of a patch that automatically >> shutdowns

Re: [RFQ] make witness panic an option

2012-11-15 Thread Adrian Chadd
On 15 November 2012 10:01, Attilio Rao wrote: > I think that your worries are focused more around the latter than the > former, which can be easilly shut down already today. > > And frankly I will never be in favor of a patch that automatically > shutdowns lock assertion. Please patch your local c

Re: [RFQ] make witness panic an option

2012-11-15 Thread Attilio Rao
On 11/15/12, Adrian Chadd wrote: > On 15 November 2012 09:56, Warner Losh wrote: > >>> Do you really think that an abusable mechanism will help here rather > >> It sounds like he's more worried about introducing LoRs into his wireless >> code. They are harmless, for him, and he can fix them by re

Re: [RFQ] make witness panic an option

2012-11-15 Thread Adrian Chadd
On 15 November 2012 09:56, Warner Losh wrote: >> Do you really think that an abusable mechanism will help here rather > It sounds like he's more worried about introducing LoRs into his wireless > code. They are harmless, for him, and he can fix them by reloading the > driver. They are only har

Re: [RFQ] make witness panic an option

2012-11-15 Thread Attilio Rao
On 11/15/12, Warner Losh wrote: > > On Nov 15, 2012, at 10:47 AM, Attilio Rao wrote: > >> On 11/15/12, Ian Lepore wrote: >>> On Wed, 2012-11-14 at 22:15 -0800, Adrian Chadd wrote: Hi all, When debugging and writing wireless drivers/stack code, I like to sprinkle lots of lockin

Re: [RFQ] make witness panic an option

2012-11-15 Thread Warner Losh
On Nov 15, 2012, at 10:47 AM, Attilio Rao wrote: > On 11/15/12, Ian Lepore wrote: >> On Wed, 2012-11-14 at 22:15 -0800, Adrian Chadd wrote: >>> Hi all, >>> >>> When debugging and writing wireless drivers/stack code, I like to >>> sprinkle lots of locking assertions everywhere. However, this doe

Re: [RFQ] make witness panic an option

2012-11-15 Thread Attilio Rao
On 11/15/12, Ian Lepore wrote: > On Wed, 2012-11-14 at 22:15 -0800, Adrian Chadd wrote: >> Hi all, >> >> When debugging and writing wireless drivers/stack code, I like to >> sprinkle lots of locking assertions everywhere. However, this does >> cause things to panic quite often during active develo

Re: [RFQ] make witness panic an option

2012-11-15 Thread Ian Lepore
On Wed, 2012-11-14 at 22:15 -0800, Adrian Chadd wrote: > Hi all, > > When debugging and writing wireless drivers/stack code, I like to > sprinkle lots of locking assertions everywhere. However, this does > cause things to panic quite often during active development. > > This patch (against stable

Re: [RFQ] make witness panic an option

2012-11-15 Thread Attilio Rao
On 11/15/12, Adrian Chadd wrote: > On 15 November 2012 05:27, Giovanni Trematerra > wrote: > >> I really do think that is a very bad idea. >> When a locking assertion fails you have just to stop your mind and >> think what's wrong, >> no way to postpone on this. > > Not all witness panics are act

Re: [RFQ] make witness panic an option

2012-11-15 Thread Adrian Chadd
On 15 November 2012 05:27, Giovanni Trematerra wrote: > I really do think that is a very bad idea. > When a locking assertion fails you have just to stop your mind and > think what's wrong, > no way to postpone on this. Not all witness panics are actually fatal. For a developer who is sufficient

Re: [RFQ] make witness panic an option

2012-11-15 Thread Giovanni Trematerra
On Thu, Nov 15, 2012 at 7:15 AM, Adrian Chadd wrote: > Hi all, > > When debugging and writing wireless drivers/stack code, I like to > sprinkle lots of locking assertions everywhere. However, this does > cause things to panic quite often during active development. > > This patch (against stable/9)