Re: svn commit: r367343 - in head/sys/contrib/openzfs/include/os: freebsd/zfs/sys linux/zfs/sys

2020-11-05 Thread Mateusz Guzik
On 11/5/20, Alexey Dokuchaev  wrote:
> On Wed, Nov 04, 2020 at 09:18:52PM +, Mateusz Guzik wrote:
>> New Revision: 367343
>> URL: https://svnweb.freebsd.org/changeset/base/367343
>>
>> Log:
>>   zfs: add branch prediction to ZFS_ENTER and ZFS_VERIFY_ZP macros
>>
>>   They are expected to fail only in corner cases.
>>
>> Modified:
>>   head/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_znode_impl.h
>>   head/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h
>
> Since my earlier email was ignored, I'd take this chance to ask again:
> why Linux-specific bits present in the head and had to be updated like
> in this commit?  They shouldn't have made past the vendor branch, no?
>

I don't know the reasoning for putting these files here. I suspect
this is to make merging easier. fwiw I don't think they are a problem.

The patch at hand modified them as it was based on the work against
the upstream repo and followed suit

-- 
Mateusz Guzik 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r367343 - in head/sys/contrib/openzfs/include/os: freebsd/zfs/sys linux/zfs/sys

2020-11-04 Thread Alexey Dokuchaev
On Wed, Nov 04, 2020 at 09:18:52PM +, Mateusz Guzik wrote:
> New Revision: 367343
> URL: https://svnweb.freebsd.org/changeset/base/367343
> 
> Log:
>   zfs: add branch prediction to ZFS_ENTER and ZFS_VERIFY_ZP macros
>   
>   They are expected to fail only in corner cases.
> 
> Modified:
>   head/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_znode_impl.h
>   head/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h

Since my earlier email was ignored, I'd take this chance to ask again:
why Linux-specific bits present in the head and had to be updated like
in this commit?  They shouldn't have made past the vendor branch, no?

./danfe
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r367343 - in head/sys/contrib/openzfs/include/os: freebsd/zfs/sys linux/zfs/sys

2020-11-04 Thread Kevin Bowling
This doesn't answer all of your questions but one important thing to
point out is that Mateusz is in communication with the OpenZFS and iX
folks to coordinate these changes and avoid expected merge conflicts.
The idealized workflow is that a change goes into OZFS first, but as
long as folks are in agreement that can be expedited.  Once src is on
git, it is expected this type of cherry-pick in both directions will
be easier to formally define.

Regards,
Kevin

On Wed, Nov 4, 2020 at 2:36 PM Andriy Gapon  wrote:
>
> On 04/11/2020 23:33, Mateusz Guzik wrote:
> > Well, should you check OpenZFS github you will find I post pull
> > request there as well. So whatever conflicts arise for people merging
> > stuff back are to be just whacked in favor in what's in upstream.
>
> I certainly would, but how would I know that I should?
> Any cross-reference would be of help both now and for the future code history
> archaeology.
>
> > On 11/4/20, Andriy Gapon  wrote:
> >> On 04/11/2020 23:18, Mateusz Guzik wrote:
> >>> Author: mjg
> >>> Date: Wed Nov  4 21:18:51 2020
> >>> New Revision: 367343
> >>> URL: https://svnweb.freebsd.org/changeset/base/367343
> >>>
> >>> Log:
> >>>   zfs: add branch prediction to ZFS_ENTER and ZFS_VERIFY_ZP macros
> >>>
> >>>   They are expected to fail only in corner cases.
> >>>
> >>> Modified:
> >>>   head/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_znode_impl.h
> >>>   head/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h
> >>
> >> Picking a random commit of many, is this how we do ZFS/OpenZFS changes now?
> >> Can I do the same?
> >> Who will be resolving any merge conflicts resulting from my changes?
> >>
> >> --
> >> Andriy Gapon
> >>
> >
> >
>
>
> --
> Andriy Gapon
> ___
> svn-src-h...@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r367343 - in head/sys/contrib/openzfs/include/os: freebsd/zfs/sys linux/zfs/sys

2020-11-04 Thread Andriy Gapon
On 04/11/2020 23:33, Mateusz Guzik wrote:
> Well, should you check OpenZFS github you will find I post pull
> request there as well. So whatever conflicts arise for people merging
> stuff back are to be just whacked in favor in what's in upstream.

I certainly would, but how would I know that I should?
Any cross-reference would be of help both now and for the future code history
archaeology.

> On 11/4/20, Andriy Gapon  wrote:
>> On 04/11/2020 23:18, Mateusz Guzik wrote:
>>> Author: mjg
>>> Date: Wed Nov  4 21:18:51 2020
>>> New Revision: 367343
>>> URL: https://svnweb.freebsd.org/changeset/base/367343
>>>
>>> Log:
>>>   zfs: add branch prediction to ZFS_ENTER and ZFS_VERIFY_ZP macros
>>>
>>>   They are expected to fail only in corner cases.
>>>
>>> Modified:
>>>   head/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_znode_impl.h
>>>   head/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h
>>
>> Picking a random commit of many, is this how we do ZFS/OpenZFS changes now?
>> Can I do the same?
>> Who will be resolving any merge conflicts resulting from my changes?
>>
>> --
>> Andriy Gapon
>>
> 
> 


-- 
Andriy Gapon
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r367343 - in head/sys/contrib/openzfs/include/os: freebsd/zfs/sys linux/zfs/sys

2020-11-04 Thread Mateusz Guzik
Well, should you check OpenZFS github you will find I post pull
request there as well. So whatever conflicts arise for people merging
stuff back are to be just whacked in favor in what's in upstream.

On 11/4/20, Andriy Gapon  wrote:
> On 04/11/2020 23:18, Mateusz Guzik wrote:
>> Author: mjg
>> Date: Wed Nov  4 21:18:51 2020
>> New Revision: 367343
>> URL: https://svnweb.freebsd.org/changeset/base/367343
>>
>> Log:
>>   zfs: add branch prediction to ZFS_ENTER and ZFS_VERIFY_ZP macros
>>
>>   They are expected to fail only in corner cases.
>>
>> Modified:
>>   head/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_znode_impl.h
>>   head/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h
>
> Picking a random commit of many, is this how we do ZFS/OpenZFS changes now?
> Can I do the same?
> Who will be resolving any merge conflicts resulting from my changes?
>
> --
> Andriy Gapon
>


-- 
Mateusz Guzik 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r367343 - in head/sys/contrib/openzfs/include/os: freebsd/zfs/sys linux/zfs/sys

2020-11-04 Thread Andriy Gapon
On 04/11/2020 23:18, Mateusz Guzik wrote:
> Author: mjg
> Date: Wed Nov  4 21:18:51 2020
> New Revision: 367343
> URL: https://svnweb.freebsd.org/changeset/base/367343
> 
> Log:
>   zfs: add branch prediction to ZFS_ENTER and ZFS_VERIFY_ZP macros
>   
>   They are expected to fail only in corner cases.
> 
> Modified:
>   head/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_znode_impl.h
>   head/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h

Picking a random commit of many, is this how we do ZFS/OpenZFS changes now?
Can I do the same?
Who will be resolving any merge conflicts resulting from my changes?

-- 
Andriy Gapon
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r367343 - in head/sys/contrib/openzfs/include/os: freebsd/zfs/sys linux/zfs/sys

2020-11-04 Thread Mateusz Guzik
Author: mjg
Date: Wed Nov  4 21:18:51 2020
New Revision: 367343
URL: https://svnweb.freebsd.org/changeset/base/367343

Log:
  zfs: add branch prediction to ZFS_ENTER and ZFS_VERIFY_ZP macros
  
  They are expected to fail only in corner cases.

Modified:
  head/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_znode_impl.h
  head/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h

Modified: head/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_znode_impl.h
==
--- head/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_znode_impl.h
Wed Nov  4 21:18:27 2020(r367342)
+++ head/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_znode_impl.h
Wed Nov  4 21:18:51 2020(r367343)
@@ -119,7 +119,7 @@ extern minor_t zfsdev_minor_alloc(void);
 #defineZFS_ENTER(zfsvfs) \
{ \
rrm_enter_read(&(zfsvfs)->z_teardown_lock, FTAG); \
-   if ((zfsvfs)->z_unmounted) { \
+   if (__predict_false((zfsvfs)->z_unmounted)) { \
ZFS_EXIT(zfsvfs); \
return (EIO); \
} \
@@ -130,7 +130,7 @@ extern minor_t zfsdev_minor_alloc(void);
 
 /* Verifies the znode is valid */
 #defineZFS_VERIFY_ZP(zp) \
-   if ((zp)->z_sa_hdl == NULL) { \
+   if (__predict_false((zp)->z_sa_hdl == NULL)) { \
ZFS_EXIT((zp)->z_zfsvfs); \
return (EIO); \
} \

Modified: head/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h
==
--- head/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h  Wed Nov 
 4 21:18:27 2020(r367342)
+++ head/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h  Wed Nov 
 4 21:18:51 2020(r367343)
@@ -76,7 +76,7 @@ extern "C" {
 #defineZFS_ENTER_ERROR(zfsvfs, error)  \
 do {   \
rrm_enter_read(&(zfsvfs)->z_teardown_lock, FTAG);   \
-   if ((zfsvfs)->z_unmounted) {\
+   if (unlikely((zfsvfs)->z_unmounted)) {  \
ZFS_EXIT(zfsvfs);   \
return (error); \
}   \
@@ -95,7 +95,7 @@ do {  
\
 /* Verifies the znode is valid. */
 #defineZFS_VERIFY_ZP_ERROR(zp, error)  \
 do {   \
-   if ((zp)->z_sa_hdl == NULL) {   \
+   if (unlikely((zp)->z_sa_hdl == NULL)) { \
ZFS_EXIT(ZTOZSB(zp));   \
return (error); \
}   \
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"