Re: LK_SHARED/LK_DOWNGRADE adjustments to lock.9 manual page

2012-12-05 Thread Attilio Rao
On Thu, Nov 29, 2012 at 12:05 PM, Andriy Gapon a...@freebsd.org wrote:
 on 16/11/2012 16:42 Andriy Gapon said the following:
 on 15/11/2012 23:44 Attilio Rao said the following:
 Do you think you can test this patch?:
 http://www.freebsd.org/~attilio/lockmgr_forcerec.patch

 I will use this patch in my tree, but I think that it is effectively already 
 quite
 well tested by using INVARIANTS+WITNESS.


 I've been using this patch in both debug and non-debug environments and I 
 have not
 run into any issues.  Please commit when you get a chance.
 Thank you.

Committed as r243900, please proceed with manpage cleanup.

Thanks,
Attilio


-- 
Peace can only be achieved by understanding - A. Einstein
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: LK_SHARED/LK_DOWNGRADE adjustments to lock.9 manual page

2012-11-29 Thread Andriy Gapon
on 16/11/2012 16:42 Andriy Gapon said the following:
 on 15/11/2012 23:44 Attilio Rao said the following:
 Do you think you can test this patch?:
 http://www.freebsd.org/~attilio/lockmgr_forcerec.patch
 
 I will use this patch in my tree, but I think that it is effectively already 
 quite
 well tested by using INVARIANTS+WITNESS.
 

I've been using this patch in both debug and non-debug environments and I have 
not
run into any issues.  Please commit when you get a chance.
Thank you.

-- 
Andriy Gapon
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: LK_SHARED/LK_DOWNGRADE adjustments to lock.9 manual page

2012-11-16 Thread Andriy Gapon
on 15/11/2012 23:44 Attilio Rao said the following:
 Do you think you can test this patch?:
 http://www.freebsd.org/~attilio/lockmgr_forcerec.patch

I will use this patch in my tree, but I think that it is effectively already 
quite
well tested by using INVARIANTS+WITNESS.

-- 
Andriy Gapon
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


LK_SHARED/LK_DOWNGRADE adjustments to lock.9 manual page

2012-11-15 Thread Andriy Gapon

To people knowing the code,

do the following documentation changes look correct?

--- a/share/man/man9/lock.9
+++ b/share/man/man9/lock.9
@@ -148,7 +148,9 @@ Flags indicating what action is to be taken.
 .Bl -tag -width .Dv LK_CANRECURSE
 .It Dv LK_SHARED
 Acquire a shared lock.
-If an exclusive lock is currently held, it will be downgraded.
+If an exclusive lock is currently held,
+.Dv EDEADLK
+will be returned.
 .It Dv LK_EXCLUSIVE
 Acquire an exclusive lock.
 If an exclusive lock is already held, and
@@ -158,7 +160,8 @@ is not set, the system will
 .It Dv LK_DOWNGRADE
 Downgrade exclusive lock to a shared lock.
 Downgrading a shared lock is not permitted.
-If an exclusive lock has been recursed, all references will be downgraded.
+If an exclusive lock has been recursed, the system will
+.Xr panic 9 .
 .It Dv LK_UPGRADE
 Upgrade a shared lock to an exclusive lock.
 If this call fails, the shared lock is lost.

-- 
Andriy Gapon
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org

Re: LK_SHARED/LK_DOWNGRADE adjustments to lock.9 manual page

2012-11-15 Thread Attilio Rao
On 11/15/12, Andriy Gapon a...@freebsd.org wrote:

 To people knowing the code,

 do the following documentation changes look correct?

The latter chunk is not correct.
It will panic only if assertions are on. I was thinking that however
it would be good idea to patch lockmgr to panic also in non-debugging
kernel situation.

Attilio


-- 
Peace can only be achieved by understanding - A. Einstein
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: LK_SHARED/LK_DOWNGRADE adjustments to lock.9 manual page

2012-11-15 Thread Andriy Gapon
on 15/11/2012 20:46 Attilio Rao said the following:
 On 11/15/12, Andriy Gapon a...@freebsd.org wrote:

 To people knowing the code,

 do the following documentation changes look correct?
 
 The latter chunk is not correct.
 It will panic only if assertions are on.

But the current content is not correct too?

 I was thinking that however
 it would be good idea to patch lockmgr to panic also in non-debugging
 kernel situation.

It would make sense indeed, IMO.

-- 
Andriy Gapon
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: LK_SHARED/LK_DOWNGRADE adjustments to lock.9 manual page

2012-11-15 Thread Attilio Rao
On Thu, Nov 15, 2012 at 8:38 PM, Andriy Gapon a...@freebsd.org wrote:
 on 15/11/2012 20:46 Attilio Rao said the following:
 On 11/15/12, Andriy Gapon a...@freebsd.org wrote:

 To people knowing the code,

 do the following documentation changes look correct?

 The latter chunk is not correct.
 It will panic only if assertions are on.

 But the current content is not correct too?

Indeed, current content is crappy.

 I was thinking that however
 it would be good idea to patch lockmgr to panic also in non-debugging
 kernel situation.

 It would make sense indeed, IMO.

Do you think you can test this patch?:
http://www.freebsd.org/~attilio/lockmgr_forcerec.patch

I think the LK_NOSHARE case is still fine with just asserts.

Once this patch goes in, you are free to commit your documentation one.
Thanks for fixing doc.

Attilio


-- 
Peace can only be achieved by understanding - A. Einstein
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org