Re: CVS commit: src/sys

2020-01-19 Thread Paul Goyette

On Mon, 20 Jan 2020, Ryo ONODERA wrote:


Hi,

After this commit, the kernel stalls just before root file system
will be found on my NetBSD/amd64 laptop.

Reverting
src/sys/kern/kern_rwlock.c to r1.60
and
src/sys/sys/rwlock.h to r1.12
in latest -current tree and I can get the kernel that works like
before.

And on another laptop, the problematic kernel stalls before root file
system detection like my laptop.

It may be universal problem.

Could you take a look at this problem?


I ran into the same problem trying to do an ``anita install'' under
qemu.  It got as far as identifying the boot device, and then hang.


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+



Re: CVS commit: src/sys

2020-01-19 Thread Ryo ONODERA
Sorry I have note sent this e-mail to you.

Ryo ONODERA  writes:

> Hi,
>
> After this commit, the kernel stalls just before root file system
> will be found on my NetBSD/amd64 laptop.
>
> Reverting
> src/sys/kern/kern_rwlock.c to r1.60
> and
> src/sys/sys/rwlock.h to r1.12
> in latest -current tree and I can get the kernel that works like
> before.
>
> And on another laptop, the problematic kernel stalls before root file
> system detection like my laptop.
>
> It may be universal problem.
>
> Could you take a look at this problem?
>
> Thank you.
>
> "Andrew Doran"  writes:
>
>> Module Name: src
>> Committed By:ad
>> Date:Sun Jan 19 18:34:24 UTC 2020
>>
>> Modified Files:
>>  src/sys/kern: kern_rwlock.c
>>  src/sys/sys: rwlock.h
>>
>> Log Message:
>> Tidy rwlocks a bit, no functional change intended.  Mainly:
>>
>> - rw_downgrade(): do it in a for () loop like all the others.
>> - Explicitly carry around RW_NODEBUG - don't be lazy.
>> - Remove pointless macros.
>> - Don't make assertions conditional on LOCKDEBUG, there's no reason.
>> - Make space for a new flag bit (not added yet).
>>
>>
>> To generate a diff of this commit:
>> cvs rdiff -u -r1.60 -r1.61 src/sys/kern/kern_rwlock.c
>> cvs rdiff -u -r1.12 -r1.13 src/sys/sys/rwlock.h
>>
>> Please note that diffs are not public domain; they are subject to the
>> copyright notices on the relevant files.
>>
>> Modified files:
>>
>> Index: src/sys/kern/kern_rwlock.c
>> diff -u src/sys/kern/kern_rwlock.c:1.60 src/sys/kern/kern_rwlock.c:1.61
>> --- src/sys/kern/kern_rwlock.c:1.60  Sun Jan 12 18:37:10 2020
>> +++ src/sys/kern/kern_rwlock.c   Sun Jan 19 18:34:24 2020
>> @@ -1,4 +1,4 @@
>> -/*  $NetBSD: kern_rwlock.c,v 1.60 2020/01/12 18:37:10 ad Exp $  */
>> +/*  $NetBSD: kern_rwlock.c,v 1.61 2020/01/19 18:34:24 ad Exp $  */
>>  
>>  /*-
>>   * Copyright (c) 2002, 2006, 2007, 2008, 2009, 2019, 2020
>> @@ -39,7 +39,9 @@
>>   */
>>  
>>  #include 
>> -__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.60 2020/01/12 18:37:10 ad Exp 
>> $");
>> +__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.61 2020/01/19 18:34:24 ad Exp 
>> $");
>> +
>> +#include "opt_lockdebug.h"
>>  
>>  #define __RWLOCK_PRIVATE
>>  
>> @@ -63,58 +65,32 @@ __KERNEL_RCSID(0, "$NetBSD: kern_rwlock.
>>   * LOCKDEBUG
>>   */
>>  
>> -#if defined(LOCKDEBUG)
>> -
>> -#define RW_WANTLOCK(rw, op) 
>> \
>> -LOCKDEBUG_WANTLOCK(RW_DEBUG_P(rw), (rw),\
>> -(uintptr_t)__builtin_return_address(0), op == RW_READER);
>> -#define RW_LOCKED(rw, op)   
>> \
>> -LOCKDEBUG_LOCKED(RW_DEBUG_P(rw), (rw), NULL,\
>> -(uintptr_t)__builtin_return_address(0), op == RW_READER);
>> -#define RW_UNLOCKED(rw, op) 
>> \
>> -LOCKDEBUG_UNLOCKED(RW_DEBUG_P(rw), (rw),\
>> -(uintptr_t)__builtin_return_address(0), op == RW_READER);
>> -#define RW_DASSERT(rw, cond)
>> \
>> -do {
>> \
>> -if (__predict_false(!(cond)))   \
>> -rw_abort(__func__, __LINE__, rw, "assertion failed: " #cond);\
>> -} while (/* CONSTCOND */ 0);
>> -
>> -#else   /* LOCKDEBUG */
>> -
>> -#define RW_WANTLOCK(rw, op) /* nothing */
>> -#define RW_LOCKED(rw, op)   /* nothing */
>> -#define RW_UNLOCKED(rw, op) /* nothing */
>> -#define RW_DASSERT(rw, cond)/* nothing */
>> +#define RW_DEBUG_P(rw)  (((rw)->rw_owner & RW_NODEBUG) == 0)
>>  
>> -#endif  /* LOCKDEBUG */
>> +#define RW_WANTLOCK(rw, op) \
>> +LOCKDEBUG_WANTLOCK(RW_DEBUG_P(rw), (rw), \
>> +(uintptr_t)__builtin_return_address(0), op == RW_READER);
>> +#define RW_LOCKED(rw, op) \
>> +LOCKDEBUG_LOCKED(RW_DEBUG_P(rw), (rw), NULL, \
>> +(uintptr_t)__builtin_return_address(0), op == RW_READER);
>> +#define RW_UNLOCKED(rw, op) \
>> +LOCKDEBUG_UNLOCKED(RW_DEBUG_P(rw), (rw), \
>> +(uintptr_t)__builtin_return_address(0), op == RW_READER);
>>  
>>  /*
>>   * DIAGNOSTIC
>>   */
>>  
>>  #if defined(DIAGNOSTIC)
>> -
>> -#define RW_ASSERT(rw, cond) 
>> \
>> -do {
>> \
>> -if (__predict_false(!(cond)))   \
>> +#define RW_ASSERT(rw, cond) \
>> +do { \
>> +if (__predict_false(!(cond))) \
>>  rw_abort(__func__, __LINE__, rw, "assertion failed: " #cond);\
>>  } while (/* CONSTCOND */ 0)
>> -
>>  #else
>> -
>>  #define RW_ASSERT(rw, cond) /* nothing */
>> -
>>  #endif  /* DIAGNOSTIC */
>>  
>> -#define RW_SETDEBUG(rw, on) ((rw)->rw_owner |= (on) ? 0 : 
>> RW_NODEBUG)
>> -#define RW_DEB

Re: CVS commit: src/sys

2020-01-19 Thread Ryo ONODERA
Hi,

After this commit, the kernel stalls just before root file system
will be found on my NetBSD/amd64 laptop.

Reverting
src/sys/kern/kern_rwlock.c to r1.60
and
src/sys/sys/rwlock.h to r1.12
in latest -current tree and I can get the kernel that works like
before.

And on another laptop, the problematic kernel stalls before root file
system detection like my laptop.

It may be universal problem.

Could you take a look at this problem?

Thank you.

"Andrew Doran"  writes:

> Module Name:  src
> Committed By: ad
> Date: Sun Jan 19 18:34:24 UTC 2020
>
> Modified Files:
>   src/sys/kern: kern_rwlock.c
>   src/sys/sys: rwlock.h
>
> Log Message:
> Tidy rwlocks a bit, no functional change intended.  Mainly:
>
> - rw_downgrade(): do it in a for () loop like all the others.
> - Explicitly carry around RW_NODEBUG - don't be lazy.
> - Remove pointless macros.
> - Don't make assertions conditional on LOCKDEBUG, there's no reason.
> - Make space for a new flag bit (not added yet).
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.60 -r1.61 src/sys/kern/kern_rwlock.c
> cvs rdiff -u -r1.12 -r1.13 src/sys/sys/rwlock.h
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
>
> Modified files:
>
> Index: src/sys/kern/kern_rwlock.c
> diff -u src/sys/kern/kern_rwlock.c:1.60 src/sys/kern/kern_rwlock.c:1.61
> --- src/sys/kern/kern_rwlock.c:1.60   Sun Jan 12 18:37:10 2020
> +++ src/sys/kern/kern_rwlock.cSun Jan 19 18:34:24 2020
> @@ -1,4 +1,4 @@
> -/*   $NetBSD: kern_rwlock.c,v 1.60 2020/01/12 18:37:10 ad Exp $  */
> +/*   $NetBSD: kern_rwlock.c,v 1.61 2020/01/19 18:34:24 ad Exp $  */
>  
>  /*-
>   * Copyright (c) 2002, 2006, 2007, 2008, 2009, 2019, 2020
> @@ -39,7 +39,9 @@
>   */
>  
>  #include 
> -__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.60 2020/01/12 18:37:10 ad Exp 
> $");
> +__KERNEL_RCSID(0, "$NetBSD: kern_rwlock.c,v 1.61 2020/01/19 18:34:24 ad Exp 
> $");
> +
> +#include "opt_lockdebug.h"
>  
>  #define  __RWLOCK_PRIVATE
>  
> @@ -63,58 +65,32 @@ __KERNEL_RCSID(0, "$NetBSD: kern_rwlock.
>   * LOCKDEBUG
>   */
>  
> -#if defined(LOCKDEBUG)
> -
> -#define  RW_WANTLOCK(rw, op) 
> \
> - LOCKDEBUG_WANTLOCK(RW_DEBUG_P(rw), (rw),\
> - (uintptr_t)__builtin_return_address(0), op == RW_READER);
> -#define  RW_LOCKED(rw, op)   
> \
> - LOCKDEBUG_LOCKED(RW_DEBUG_P(rw), (rw), NULL,\
> - (uintptr_t)__builtin_return_address(0), op == RW_READER);
> -#define  RW_UNLOCKED(rw, op) 
> \
> - LOCKDEBUG_UNLOCKED(RW_DEBUG_P(rw), (rw),\
> - (uintptr_t)__builtin_return_address(0), op == RW_READER);
> -#define  RW_DASSERT(rw, cond)
> \
> -do { \
> - if (__predict_false(!(cond)))   \
> - rw_abort(__func__, __LINE__, rw, "assertion failed: " #cond);\
> -} while (/* CONSTCOND */ 0);
> -
> -#else/* LOCKDEBUG */
> -
> -#define  RW_WANTLOCK(rw, op) /* nothing */
> -#define  RW_LOCKED(rw, op)   /* nothing */
> -#define  RW_UNLOCKED(rw, op) /* nothing */
> -#define  RW_DASSERT(rw, cond)/* nothing */
> +#define  RW_DEBUG_P(rw)  (((rw)->rw_owner & RW_NODEBUG) == 0)
>  
> -#endif   /* LOCKDEBUG */
> +#define  RW_WANTLOCK(rw, op) \
> +LOCKDEBUG_WANTLOCK(RW_DEBUG_P(rw), (rw), \
> +(uintptr_t)__builtin_return_address(0), op == RW_READER);
> +#define  RW_LOCKED(rw, op) \
> +LOCKDEBUG_LOCKED(RW_DEBUG_P(rw), (rw), NULL, \
> +(uintptr_t)__builtin_return_address(0), op == RW_READER);
> +#define  RW_UNLOCKED(rw, op) \
> +LOCKDEBUG_UNLOCKED(RW_DEBUG_P(rw), (rw), \
> +(uintptr_t)__builtin_return_address(0), op == RW_READER);
>  
>  /*
>   * DIAGNOSTIC
>   */
>  
>  #if defined(DIAGNOSTIC)
> -
> -#define  RW_ASSERT(rw, cond) 
> \
> -do { \
> - if (__predict_false(!(cond)))   \
> +#define  RW_ASSERT(rw, cond) \
> +do { \
> + if (__predict_false(!(cond))) \
>   rw_abort(__func__, __LINE__, rw, "assertion failed: " #cond);\
>  } while (/* CONSTCOND */ 0)
> -
>  #else
> -
>  #define  RW_ASSERT(rw, cond) /* nothing */
> -
>  #endif   /* DIAGNOSTIC */
>  
> -#define  RW_SETDEBUG(rw, on) ((rw)->rw_owner |= (on) ? 0 : 
> RW_NODEBUG)
> -#define  RW_DEBUG_P(rw)  (((rw)->rw_owner & RW_NODEBUG) 
> == 0)
> -#if defined(LOCKDEBUG)
> -#define  RW_INHERITDEBUG(n, o)   (n) |= (o) & RW_NODEBUG
> -#else /* defined(LOCKDEBUG) */
> -#define  RW_INH

Re: CVS commit: src/doc

2020-01-19 Thread Kamil Rytarowski
On 19.01.2020 07:57, Jason R Thorpe wrote:
> Module Name:  src
> Committed By: thorpej
> Date: Sun Jan 19 06:57:39 UTC 2020
> 
> Modified Files:
>   src/doc: CHANGES
> 
> Log Message:
> Note removal of HIPPI support.

Thanks!

Please keep in sync src/doc/TODO.smpnet.



signature.asc
Description: OpenPGP digital signature