Re: svn commit: r312600 - head/sys/kern

2017-01-22 Thread Konstantin Belousov
On Mon, Jan 23, 2017 at 04:00:19AM +1100, Bruce Evans wrote: > On Sun, 22 Jan 2017, Konstantin Belousov wrote: > > > On Sun, Jan 22, 2017 at 11:41:09PM +1100, Bruce Evans wrote: > >> On Sun, 22 Jan 2017, Mateusz Guzik wrote: > >>> ... > >>> I have to disagree about the usefulness remark. If you ch

Re: svn commit: r312600 - head/sys/kern

2017-01-22 Thread Bruce Evans
On Sun, 22 Jan 2017, Konstantin Belousov wrote: On Sun, Jan 22, 2017 at 11:41:09PM +1100, Bruce Evans wrote: On Sun, 22 Jan 2017, Mateusz Guzik wrote: ... I have to disagree about the usefulness remark. If you check generated assembly for amd64 (included below), you will see the uncommon code

Re: svn commit: r312600 - head/sys/kern

2017-01-22 Thread Konstantin Belousov
On Sun, Jan 22, 2017 at 11:41:09PM +1100, Bruce Evans wrote: > On Sun, 22 Jan 2017, Mateusz Guzik wrote: > > > On Sun, Jan 22, 2017 at 12:07:56PM +1100, Bruce Evans wrote: > > ... > >> Later commits further unimproved style by adding __predict_ugly() and > >> long lines from blind substitution of

Re: svn commit: r312600 - head/sys/kern

2017-01-22 Thread Bruce Evans
On Sun, 22 Jan 2017, Mateusz Guzik wrote: On Sun, Jan 22, 2017 at 12:07:56PM +1100, Bruce Evans wrote: ... Later commits further unimproved style by adding __predict_ugly() and long lines from blind substitution of that. __predict_ugly() is almost as useful as 'register', but more invasive.

Re: svn commit: r312600 - head/sys/kern

2017-01-22 Thread Mateusz Guzik
On Sun, Jan 22, 2017 at 12:07:56PM +1100, Bruce Evans wrote: > On Sat, 21 Jan 2017, Konstantin Belousov wrote: > > >On Sat, Jan 21, 2017 at 06:38:17PM +, Mateusz Guzik wrote: > >>... > >>Log: > >> vfs: refactor _vn_lock > >> > >> Stop testing for LK_RETRY and error multiple times. Also postp

Re: svn commit: r312600 - head/sys/kern

2017-01-21 Thread Bruce Evans
On Sat, 21 Jan 2017, Konstantin Belousov wrote: On Sat, Jan 21, 2017 at 06:38:17PM +, Mateusz Guzik wrote: ... Log: vfs: refactor _vn_lock Stop testing for LK_RETRY and error multiple times. Also postpone the VI_DOOMED until after LK_RETRY was seen as it reads from the vnode. No f

Re: svn commit: r312600 - head/sys/kern

2017-01-21 Thread Mateusz Guzik
On Sat, Jan 21, 2017 at 09:51:14PM +0200, Konstantin Belousov wrote: > On Sat, Jan 21, 2017 at 06:38:17PM +, Mateusz Guzik wrote: > > + if (flags & LK_RETRY) { > Stylish test is > if ((flags & LK_RETRY) != 0) { > > + if ((error != 0)) > Too many (). > > > +

Re: svn commit: r312600 - head/sys/kern

2017-01-21 Thread Konstantin Belousov
On Sat, Jan 21, 2017 at 06:38:17PM +, Mateusz Guzik wrote: > Author: mjg > Date: Sat Jan 21 18:38:16 2017 > New Revision: 312600 > URL: https://svnweb.freebsd.org/changeset/base/312600 > > Log: > vfs: refactor _vn_lock > > Stop testing for LK_RETRY and error multiple times. Also postpon

svn commit: r312600 - head/sys/kern

2017-01-21 Thread Mateusz Guzik
Author: mjg Date: Sat Jan 21 18:38:16 2017 New Revision: 312600 URL: https://svnweb.freebsd.org/changeset/base/312600 Log: vfs: refactor _vn_lock Stop testing for LK_RETRY and error multiple times. Also postpone the VI_DOOMED until after LK_RETRY was seen as it reads from the vnode.