Please pull rdma.git
Hi Linus,
This is the first round of fixes for the -rc cycle. It isn't all because a few of the drivers have lots of backlogged fixes so I'll do those separately. I've tried to pare this down to just important things that qualify for -rc fixes and not new development. The one thing sitting in a grey area is the four patch series that fixes the bad noio memalloc usage in the IPoIB ULP (I included it because using the proper API instead of a poor hack around solution seems like a "fix" to me), there is a two patch series that changes how ib_modify_qp is called and seems like lots of lines, but it clearly makes the code better and the second patch is the problem resolution, and I kept one patch in that was not a fix only patch because it was part of a 5 patch series and it was the only non-fix in the bunch (checkpatch.pl warnings patch from Lijun Ou). This specific branch/HEAD has not been through linux-next, although all of the patches in this branch went through linux-next previously as part of a larger branch, just since I pared it down to fixes only it has not. And it went to 0day, where it timed out all but 13 configs, but in the 13 that passed was the 7.2-rhel-x86_64 config which I know will build the majority of the RDMA subsystem.
Here's the boilerplate:
The following changes since commit5771a8c08880cdca3bfb4a3fc6d309d6bba20877:
Linux v4.13-rc1 (2017-07-15 15:22:10 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma.git
tags/for-linus
for you to fetch changes up toebc9ca43e1d52a85c72fc2d343f353386ed6c188:
IB/core: Allow QP state transition from reset to error (2017-07-17
21:21:30 -0400)
----------------------------------------------------------------
First set of -rc fixes for 4.13 cycle
- Misc. iSER fixes
- Namespace fixups
- Fix the fact that IPoIB didn't use the proper API for noio mem allocs
- rxe driver fixes
- hns_roce fixes
- Misc core fixes
- Misc IPoIB fixes
----------------------------------------------------------------
Amrani, Ram (1):
RDMA/qedr: Add qedr to MAINTAINERS file
Bart Van Assche (1):
mlx5: Avoid that mlx5_ib_sg_to_klms() overflows the klms[] array
Dennis Dalessandro (1):
IB/hfi1: Ensure dd->gi_mask can not be overflowed
Doug Ledford (1):
Merge tag 'v4.13-rc1' into k.o/for-4.13-rc
Erez Shitrit (2):
IB/IPoIB: Forward MTU change to driver below IB/ipoib: Let lower driver handle get_stats64 call
Gustavo A. R. Silva (1):
RDMA/core: Document confusing code
Leon Romanovsky (6):
IB: Convert msleep below 20ms to usleep_range IB/IPoIB: Convert IPoIB to memalloc_noio_* calls IB/{rdmavt, qib, hfi1}: Remove gfp flags argument {net, IB}/mlx4: Remove gfp flags argument IB/core: Remove NOIO QP create flag IB/mlx5: Clean mr_cache debugfs in case of failure
Majd Dibbiny (1):
IB/core: Add ordered workqueue for RoCE GID management
Mike Marciniszyn (1):
IB/iser: Handle lack of memory management extentions correctly
Moni Shoua (2):
IB/core: Namespace is mandatory input for address resolution IB/core: Don't resolve IP address to the loopback device
Parav Pandit (2):
IB/core: Introduce modify QP operation with udata IB/uverbs: Make use of ib_modify_qp variant to avoid resolving
DMAC
Tadeusz Struk (1):
IB/core: Allow QP state transition from reset to error
Vladimir Neyelov (1):
IB/iser: Fix connection teardown race condition
Yonatan Cohen (1):
IB/rxe: Fix kernel panic from skb destructor
oulijun (5):
IB/hns: Fix the bug of polling cq failed for loopback Qps IB/hns: Fix the bug with wild pointer when destroy rc qp IB/hns: Fix the bug with rdma operation
IB/hns: Fix the bug with modifying the MAC address without
removing the driver
IB/hns: Fix for checkpatch.pl comment style warnings
yonatanc (1):
IB/rxe: Set dma_mask and coherent_dma_mask
MAINTAINERS | 8 ++ drivers/infiniband/core/addr.c | 46 +++++++++--- drivers/infiniband/core/cma.c | 32 +------- drivers/infiniband/core/roce_gid_mgmt.c | 11 ++- drivers/infiniband/core/uverbs_cmd.c | 23 +----- drivers/infiniband/core/verbs.c | 51 +++++++++---- drivers/infiniband/hw/hfi1/chip.c | 7 +- drivers/infiniband/hw/hfi1/qp.c | 7 +- drivers/infiniband/hw/hfi1/qp.h | 3 +- drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 86 +++++++++++++- -------- drivers/infiniband/hw/hns/hns_roce_main.c | 3 - drivers/infiniband/hw/mlx4/cq.c | 6 +- drivers/infiniband/hw/mlx4/main.c | 2 +- drivers/infiniband/hw/mlx4/mcg.c | 2 +- drivers/infiniband/hw/mlx4/mlx4_ib.h | 1 - drivers/infiniband/hw/mlx4/qp.c | 40 +++++----- drivers/infiniband/hw/mlx4/srq.c | 8 +- drivers/infiniband/hw/mlx5/mr.c | 36 +++++---- drivers/infiniband/hw/nes/nes_hw.c | 4 +- drivers/infiniband/hw/qib/qib_qp.c | 15 ++-- drivers/infiniband/hw/qib/qib_verbs.h | 4 +- drivers/infiniband/sw/rdmavt/qp.c | 48 ++++-------- drivers/infiniband/sw/rxe/rxe_net.c | 3 + drivers/infiniband/sw/rxe/rxe_verbs.c | 2 + drivers/infiniband/ulp/ipoib/ipoib_cm.c | 20 +++-- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 2 +- drivers/infiniband/ulp/ipoib/ipoib_main.c | 31 +++++++- drivers/infiniband/ulp/iser/iscsi_iser.c | 11 +++ drivers/infiniband/ulp/iser/iser_verbs.c | 10 ++- drivers/net/ethernet/mellanox/mlx4/alloc.c | 29 ++++---- drivers/net/ethernet/mellanox/mlx4/cq.c | 4 +- drivers/net/ethernet/mellanox/mlx4/en_rx.c | 7 +- drivers/net/ethernet/mellanox/mlx4/en_tx.c | 2 +- drivers/net/ethernet/mellanox/mlx4/icm.c | 7 +- drivers/net/ethernet/mellanox/mlx4/icm.h | 3 +- drivers/net/ethernet/mellanox/mlx4/mlx4.h | 4 +- drivers/net/ethernet/mellanox/mlx4/mr.c | 17 ++--- drivers/net/ethernet/mellanox/mlx4/qp.c | 20 ++--- .../net/ethernet/mellanox/mlx4/resource_tracker.c | 4 +- drivers/net/ethernet/mellanox/mlx4/srq.c | 4 +- include/linux/mlx4/device.h | 10 +-- include/rdma/ib_verbs.h | 18 ++++- include/rdma/rdma_vt.h | 5 +- 43 files changed, 366 insertions(+), 290 deletions(-)
Signature · 8 lines
Doug Ledford <[email protected]> GPG KeyID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 2 lines · Doug Ledford
This is the first round of fixes for the -rc cycle.
Pulled. However, I want to complain (again!) about bad merge commits.
You're not the only one doing this, so this is not rdma-specific, but I complain when I notice.
There's a merge commit in there that has no explanation. This is the totality of the commit message:
Merge tag 'v4.13-rc1' into k.o/for-4.13-rc
Linux v4.13-rc1and I want to point out that there is *nothing* there that explains why that merge exists.
Dammit, if you cannot explain why a merge exists, you should not do that merge! It's that simple.
There is absolutely no excuse for commits without explanations, and that is *doubly* true of merge commits that don't even have any sane patch associated with them.
A normal commit that does an obvious one-liner fix? It really may not need more than a trivial commit message saying "Fix typo in xyz". The rest of the commit explains it well enough.
A merge? There *has* to be an explanation for why the merge exists. What problem did that merge fix? Why was it done in the first palce?
And if the only reason for that merge is "sync with upstream", then no, that is not a sufficient reason. It has to have an actual real reason, and it needs to be stated.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): CA+55aFyMw63bV+KOOiP9MbXF=BU8mHYEzBYsNH=xrVWxO=rzKg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 13 lines · Linus Torvalds
Quoted 2 lines · Doug Ledford
This is the first round of fixes for the -rc cycle.
Pulled. However, I want to complain (again!) about bad merge commits.
You're not the only one doing this, so this is not rdma-specific, but I complain when I notice.
There's a merge commit in there that has no explanation. This is the totality of the commit message:
Quoted 6 lines
Merge tag 'v4.13-rc1' into k.o/for-4.13-rc Linux v4.13-rc1and I want to point out that there is *nothing* there that explains why that merge exists.
Fair enough. My branch still had two unpulled commits and was based on v4.12-rc3. But, you had already taken the SELinux/RDMA patches through the SELinux tree during this merge window, and two of the fix patches in my pull request would have produced conflicts for you if I didn't merge up to a common ancestor that had the SELinux/RDMA patches prior to applying those patches to my tree (these two in particular):
f7c8f2e9ddc7 IB/uverbs: Make use of ib_modify_qp variant to avoid resolving DMACa512c2fbef9c IB/core: Introduce modify QP operation with udata
So I didn't want to abandon the branch with those commits in them, hence I did the forward merge and then proceeded with applying the commits for you to pull.
Quoted 6 lines
A merge? There *has* to be an explanation for why the merge exists. What problem did that merge fix? Why was it done in the first palce?
And if the only reason for that merge is "sync with upstream", then no, that is not a sufficient reason. It has to have an actual real reason, and it needs to be stated.
Does this apply to the for-next area as well? In particular, I was planning on changing my process so that my for-next branch would regularly sync with tagged rc releases (I believe this is what Dave Miller does with his tree, or else he's getting updates to later -rcs by pulling from other people, but I know I see merge commits for your -rc releases in his history when I go scanning through it). This is how I intended to get the -rc fixes I send you into my for-next area so that for-next development is against the RDMA subsystem as it exists including the -rc fixes, and not as it existed when I branched off the for-next branch. I can merge my -rc branch instead if that is preferred, and only merge the -rcs if I need one for a specific out-of- RDMA area feature for building against.
Signature · 8 lines
Doug Ledford <[email protected]> GPG KeyID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 7 lines · Doug Ledford
Fair enough. My branch still had two unpulled commits and was based on v4.12-rc3. But, you had already taken the SELinux/RDMA patches through the SELinux tree during this merge window, and two of the fix patches in my pull request would have produced conflicts for you if I didn't merge up to a common ancestor that had the SELinux/RDMA patches prior to applying those patches to my tree (these two in particular):
Please don't worry about conflicts, unless they are something really really fundamentally hard to merge. And even then, for rdma, I probably want to see them, just to see what the hell went wrong *this time*.
Quoted 5 lines
Quoted 3 lines
And if the only reason for that merge is "sync with upstream", then no, that is not a sufficient reason. It has to have an actual real reason, and it needs to be stated.
Does this apply to the for-next area as well?
Largely, yes. Because the further away "for-next" gets from what you then eventually send me, if your for-next branch has odd useless merges, then either what you send me will have them too, or what you send me will be something entirely different and rebased.
Basically, "automated merges" is wrong and bad. The ACPI people used to do them, and at some point their pull requests had more merge commits than they had actual changes.
Merges should be generally *minimized*. They make it much harder to see what is actually your new independent work, and what is work that is on top of random other things.
Regular automated merges is exactly the wrong thing to do, because it basically guarantees that you don't have a nice stand-alone development series (everything you do will be punctuated by those merges), _and_ that the merge commits are bad and have no good reason for them.
Finally, the merges have a fundamental problem that is from past problems with rdma - in particular the history of mixing stuff up and having teams within one single company not even being able to talk or synchronize with each other.
If you need merges for conflict resolution, it indicates to me that rdma *still* has that issue where people fight over the direction and the drivers between different teams.
So while merges in general are something that should be avoided, when it comes to rdma in _particular_ I don't like seeing them, because I get the feeling that they are papering over the nasty development problems you guys have had, and are done as a way to handle the conflicts that were due to bad hygiene.
So the *one* kind of merge that is good is the "development of this topic branch is finished and done, let's merge it up". But that is never about time, that's about "I'm done with this series, it's good to go into my main branch". That's a "forward merge", where you really merge the new and finished development tree into the base.
The back-merges, when you merge some unrelated development, is generally a bad sign. It inevitably happens for various reasons, but it should be seen as the exception, not the rule, and it should *always* have an explanation.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): CA+55aFxYrrWO0NFJLzMiSQxPKMcoLUD=xA0e-g01riFfX5-Vug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 65 lines · Linus Torvalds
Quoted 7 lines · Doug Ledford
Fair enough. My branch still had two unpulled commits and was based on v4.12-rc3. But, you had already taken the SELinux/RDMA patches through the SELinux tree during this merge window, and two of the fix patches in my pull request would have produced conflicts for you if I didn't merge up to a common ancestor that had the SELinux/RDMA patches prior to applying those patches to my tree (these two in particular):
Please don't worry about conflicts, unless they are something really really fundamentally hard to merge. And even then, for rdma, I probably want to see them, just to see what the hell went wrong *this time*.
Quoted 5 lines
Quoted 3 lines
And if the only reason for that merge is "sync with upstream", then no, that is not a sufficient reason. It has to have an actual real reason, and it needs to be stated.
Does this apply to the for-next area as well?
Largely, yes. Because the further away "for-next" gets from what you then eventually send me, if your for-next branch has odd useless merges, then either what you send me will have them too, or what you send me will be something entirely different and rebased.
Basically, "automated merges" is wrong and bad. The ACPI people used to do them, and at some point their pull requests had more merge commits than they had actual changes.
Merges should be generally *minimized*. They make it much harder to see what is actually your new independent work, and what is work that is on top of random other things.
Regular automated merges is exactly the wrong thing to do, because it basically guarantees that you don't have a nice stand-alone development series (everything you do will be punctuated by those merges), _and_ that the merge commits are bad and have no good reason for them.
Finally, the merges have a fundamental problem that is from past problems with rdma - in particular the history of mixing stuff up and having teams within one single company not even being able to talk or synchronize with each other.
If you need merges for conflict resolution, it indicates to me that rdma *still* has that issue where people fight over the direction and the drivers between different teams.
So while merges in general are something that should be avoided, when it comes to rdma in _particular_ I don't like seeing them, because I get the feeling that they are papering over the nasty development problems you guys have had, and are done as a way to handle the conflicts that were due to bad hygiene.
So the *one* kind of merge that is good is the "development of this topic branch is finished and done, let's merge it up". But that is never about time, that's about "I'm done with this series, it's good to go into my main branch". That's a "forward merge", where you really merge the new and finished development tree into the base.
The back-merges, when you merge some unrelated development, is generally a bad sign. It inevitably happens for various reasons, but it should be seen as the exception, not the rule, and it should *always* have an explanation.
Quoted 5 lines
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
I'm trying to understand why merges are being done instead of rebases. Since we don't want to include other people's work, it seems that it is cleaner to do a rebase. This is more for my education with using Git with such a large project rather than me suggesting something useful. (I dropped Linus from this part of the thread so as not to bother him with an off-topic conversation).
Thanks,
Robert
----------------
Robert LeBlanc
PGP Fingerprint 79A2 9CA4 6CC4 45DD A904 C70E E654 3BB2 FA62 B9F1 --
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): CAANLjFr9DxfoR_H5rp1ag_fC5AqxDJ5ZEj52wF-W2eGjof6iqg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 1 line · Robert LeBlanc
I'm trying to understand why merges are being done instead of rebases.
Hello Robert,
Linus has explained several times that it is completely unacceptable to rebase patches from someone else. See e.g.
http://yarchive.net/comp/linux/git_rebase.html.
Bart.--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 6 lines · Robert LeBlanc
Quoted 4 lines · Linus Torvalds
On Tue, Jul 18, 2017 at 12:07 PM, Doug Ledford <[email protected]
Quoted 3 lines
wrote:
Quoted 7 lines
I'm trying to understand why merges are being done instead of rebases.
Since we don't want to include other people's work, it seems that it is cleaner to do a rebase. This is more for my education with using Git with such a large project rather than me suggesting something useful. (I dropped Linus from this part of the thread so as not to bother him with an off-topic conversation).
Rebases change the history of a patch. If I commit a patch on July 7th, and then rebase on July 20th, the patch gets rewritten with the new date. In addition, they get new commit hashes. So if someone pulls my tree on the 9th, sees the commit hash for their patch, and then references it in an email or a bug report, then I rebase on the 20th, the old commit hash is gone and will be replaced with a new one. Finally, if someone pulls my tree on the 8th, and then again on the 22nd, and they don't know I've rebased it, the pull will attempt to put all of the new hashes on top of the old hashes for the same commits. It creates a ton of merge work that is error prone. Sometimes chunks get added twice, stuff like that.
There are a few things you can do to get around this, and I sometimes use those tricks. I've declared on-list that my github repo is subject to being rebased at any time, so people know this. I also have my github repo as the source for my 0day testing. So, I can push to github, wait for 0day test results, and if there was a problem, I can fix it using a rebase of whatever patch was broken, repush to github, and repeat until 0day testing passes, and only then do I push to my kernel.org repo, which is taken to be involate and rebases are forbidden. But even there, if I *really* have to, I can rebase by deleting the branch I originally created and creating a new branch with the rebase on it under a different name. That prevents someone from accidentally pulling the rebase on top of a previous pull. But I *really* try to avoid that.
Signature · 8 lines
Doug Ledford <[email protected]> GPG KeyID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1500486883.23761.14.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Quoted 28 lines · Doug Ledford
Quoted 7 lines · Robert LeBlanc
Quoted 4 lines · Linus Torvalds
On Tue, Jul 18, 2017 at 12:07 PM, Doug Ledford <[email protected]
Quoted 3 lines
wrote:
Quoted 7 lines
I'm trying to understand why merges are being done instead of rebases.
Since we don't want to include other people's work, it seems that it is cleaner to do a rebase. This is more for my education with using Git with such a large project rather than me suggesting something useful. (I dropped Linus from this part of the thread so as not to bother him with an off-topic conversation).Rebases change the history of a patch. If I commit a patch on July 7th, and then rebase on July 20th, the patch gets rewritten with the new date. In addition, they get new commit hashes. So if someone pulls my tree on the 9th, sees the commit hash for their patch, and then references it in an email or a bug report, then I rebase on the 20th, the old commit hash is gone and will be replaced with a new one. Finally, if someone pulls my tree on the 8th, and then again on the 22nd, and they don't know I've rebased it, the pull will attempt to put all of the new hashes on top of the old hashes for the same commits. It creates a ton of merge work that is error prone. Sometimes chunks get added twice, stuff like that.
Quoted 13 lines
There are a few things you can do to get around this, and I sometimes use those tricks. I've declared on-list that my github repo is subject to being rebased at any time, so people know this. I also have my github repo as the source for my 0day testing. So, I can push to github, wait for 0day test results, and if there was a problem, I can fix it using a rebase of whatever patch was broken, repush to github, and repeat until 0day testing passes, and only then do I push to my kernel.org repo, which is taken to be involate and rebases are forbidden. But even there, if I *really* have to, I can rebase by deleting the branch I originally created and creating a new branch with the rebase on it under a different name. That prevents someone from accidentally pulling the rebase on top of a previous pull. But I *really* try to avoid that.
Hello Doug,
Rebases do not only change the commit ID of a patch but can also change the patch itself. If e.g. a patch (a) that was posted on the linux-rdma mailing list contains two changes and a patch (b) contains only one of two changes, if the rdma tree gets rebased on top of a tree that has patch (b) then the rebase will modify patch (a) such that only the changes that were not in patch (b) remain. git will neither complain about this nor report it. Since a rebase can modify a patch it also invalidates any testing and reviews for that patch. This why Linus hates rebases and why nowadays Linus refuses to accept any pull requests of trees that have been rebased. I hope I misunderstood you but if you are routinely rebasing branches with patches that come from the linux-rdma mailing list please stop doing this.
A model that some other kernel maintainers (e.g. Jens Axboe) follow is as follows:
* Maintain one branch per pull request that will be sent to Linus, e.g. for-4.13/block. Never rebase this branch, never rewrite its history and only merge Linus' branch into this branch if absolutely necessary.
* Every time a patch has to be applied, use "git am" to apply it to the appropriate branch. Complain on the mailing list if "git am" complains. Add the maintainer Signed-off-by and edit the patch if this is considered necessary.
* Maintain a for-next branch that is the result of merging all branches that will be sent to Linus. Resolve any merge conflicts if necessary. Ensure that this branch is included in Steven Rostedt's linux-next tree and that it gets tested by the zero-day testing infrastructure.
Bart.--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 43 lines · Bart Van Assche
Quoted 28 lines · Doug Ledford
Quoted 7 lines · Robert LeBlanc
Quoted 4 lines · Linus Torvalds
On Tue, Jul 18, 2017 at 12:07 PM, Doug Ledford <[email protected]
Quoted 3 lines
wrote:
Quoted 7 lines
I'm trying to understand why merges are being done instead of rebases.
Since we don't want to include other people's work, it seems that it is cleaner to do a rebase. This is more for my education with using Git with such a large project rather than me suggesting something useful. (I dropped Linus from this part of the thread so as not to bother him with an off-topic conversation).Rebases change the history of a patch. If I commit a patch on July 7th, and then rebase on July 20th, the patch gets rewritten with the new date. In addition, they get new commit hashes. So if someone pulls my tree on the 9th, sees the commit hash for their patch, and then references it in an email or a bug report, then I rebase on the 20th, the old commit hash is gone and will be replaced with a new one. Finally, if someone pulls my tree on the 8th, and then again on the 22nd, and they don't know I've rebased it, the pull will attempt to put all of the new hashes on top of the old hashes for the same commits. It creates a ton of merge work that is error prone. Sometimes chunks get added twice, stuff like that.
Quoted 13 lines
There are a few things you can do to get around this, and I sometimes use those tricks. I've declared on-list that my github repo is subject to being rebased at any time, so people know this. I also have my github repo as the source for my 0day testing. So, I can push to github, wait for 0day test results, and if there was a problem, I can fix it using a rebase of whatever patch was broken, repush to github, and repeat until 0day testing passes, and only then do I push to my kernel.org repo, which is taken to be involate and rebases are forbidden. But even there, if I *really* have to, I can rebase by deleting the branch I originally created and creating a new branch with the rebase on it under a different name. That prevents someone from accidentally pulling the rebase on top of a previous pull. But I *really* try to avoid that.
Quoted 8 lines
Hello Doug,
Rebases do not only change the commit ID of a patch but can also change the patch itself. If e.g. a patch (a) that was posted on the linux-rdma mailing list contains two changes and a patch (b) contains only one of two changes, if the rdma tree gets rebased on top of a tree that has patch (b) then the rebase will modify patch (a) such that only the changes that were not in patch (b) remain. git will neither complain about this nor report it.
This is no different than if you run git am on patch (b) and then patch
(a) on the same branch, except the change will be lost in the "conflicts existed when applying the patch, please apply and resolve then commit the result". In this case patch (a) will loose the exact same data that git dropped out during a rebase.
Quoted 3 lines
Since
a rebase can modify a patch it also invalidates any testing and reviews for that patch.
The same can be said of the situation I listed above. It's up to my discretion to determine if the change is significant enough to warrant going back and getting new reviews. If the issue is that there was a typo in a patch that caused a build error, I'm not going to invalidate reviews for that.
Quoted 4 lines
This why Linus hates rebases and why nowadays Linus refuses to accept any pull requests of trees that have been rebased. I hope I misunderstood you but if you are routinely rebasing branches with patches that come from the linux-rdma mailing list please stop doing this.
Routinely? No. What I really use it for is when I'm taking a stack of patches into either their own branch or directly onto my branch, if I run into problems in the build test phase, then I'll rebase to fix the build issues. But that's limited to the stack I just took, so it all happens as part of the "review, integrate, build, test" cycle for that day's work. By the time I leave for the day and push it to k.o (or at worst come in the next morning and check 0day status and then either fixup or push to k.o), it won't be rebased any more. And if I split my day's work up into different stacks, then once one stack is pushed to k.o, that stack won't be rebased even if later stacks that same day need rebasing to build/work properly.
Quoted 5 lines
A model that some other kernel maintainers (e.g. Jens Axboe) follow is as follows:
* Maintain one branch per pull request that will be sent to Linus, e.g. for-4.13/block. Never rebase this branch, never rewrite its history and only merge Linus' branch into this branch if absolutely necessary.
Quoted 8 lines
* Every time a patch has to be applied, use "git am" to apply it to the appropriate branch. Complain on the mailing list if "git am" complains. Add the maintainer Signed-off-by and edit the patch if this is considered necessary.
* Maintain a for-next branch that is the result of merging all branches that will be sent to Linus. Resolve any merge conflicts if necessary. Ensure that this branch is included in Steven Rostedt's linux-next tree and that it gets tested by the zero-day testing infrastructure.
This is fairly similar to what I do. I really only use rebases as part of my internal fixups for build issues in a given day's/stack's integration, which, BTW, is in line with what Linus says in the email you linked to.
Signature · 3 lines
Doug Ledford <[email protected]> GPG Key ID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
A message that is not in the archive (sent off-list or not yet received): 6b6d3dba-8eac-ef75-ef23-6e4e469670b6-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Quoted 3 lines · Doug Ledford
Quoted 2 lines · Bart Van Assche
On Wed, 2017-07-19 at 13:54 -0400, Doug Ledford wrote:
that this branch is included in Steven Rostedt's linux-next tree and that
Credit where credit is due BTW, the linux-next tree is handled by Stephen Rothwell. Steven Rostedt is another kernel engineer of his own separate acclaim, being maintainer of the ftrace subsystem and listed reviewer for multiple other items (SRCU, RCU, etc.).
Signature · 3 lines
Doug Ledford <[email protected]> GPG Key ID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
Quoted 41 lines · Doug Ledford
Quoted 6 lines · Robert LeBlanc
Quoted 4 lines · Linus Torvalds
On Tue, Jul 18, 2017 at 12:07 PM, Doug Ledford <[email protected]
Quoted 3 lines
wrote:
Quoted 7 lines
I'm trying to understand why merges are being done instead of rebases.
Since we don't want to include other people's work, it seems that it is cleaner to do a rebase. This is more for my education with using Git with such a large project rather than me suggesting something useful. (I dropped Linus from this part of the thread so as not to bother him with an off-topic conversation).Rebases change the history of a patch. If I commit a patch on July 7th, and then rebase on July 20th, the patch gets rewritten with the new date. In addition, they get new commit hashes. So if someone pulls my tree on the 9th, sees the commit hash for their patch, and then references it in an email or a bug report, then I rebase on the 20th, the old commit hash is gone and will be replaced with a new one. Finally, if someone pulls my tree on the 8th, and then again on the 22nd, and they don't know I've rebased it, the pull will attempt to put all of the new hashes on top of the old hashes for the same commits. It creates a ton of merge work that is error prone. Sometimes chunks get added twice, stuff like that.
There are a few things you can do to get around this, and I sometimes use those tricks. I've declared on-list that my github repo is subject to being rebased at any time, so people know this. I also have my github repo as the source for my 0day testing. So, I can push to github, wait for 0day test results, and if there was a problem, I can fix it using a rebase of whatever patch was broken, repush to github, and repeat until 0day testing passes, and only then do I push to my kernel.org repo, which is taken to be involate and rebases are forbidden. But even there, if I *really* have to, I can rebase by deleting the branch I originally created and creating a new branch with the rebase on it under a different name. That prevents someone from accidentally pulling the rebase on top of a previous pull. But I *really* try to avoid that.
Quoted 5 lines
--
Doug Ledford <[email protected]>GPG KeyID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
Thank you Doug and Bart for taking the time to explain this to me.
----------------
Robert LeBlanc
PGP Fingerprint 79A2 9CA4 6CC4 45DD A904 C70E E654 3BB2 FA62 B9F1 --
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 15 lines · Linus Torvalds
Quoted 12 lines · Doug Ledford
Fair enough. My branch still had two unpulled commits and was based on
v4.12-rc3. But, you had already taken the SELinux/RDMA patches through
the SELinux tree during this merge window, and two of the fix patches
in my pull request would have produced conflicts for you if I didn't
merge up to a common ancestor that had the SELinux/RDMA patches prior
to applying those patches to my tree (these two in particular):
Quoted 4 lines
Please don't worry about conflicts, unless they are something really really fundamentally hard to merge. And even then, for rdma, I probably want to see them, just to see what the hell went wrong *this time*.
There wasn't anything wrong. Not every conflict is a failure of development hygiene as you call it below. It's just that the SELinux patches touched a lot of entry points...*not* conflicting with them would have been more of a magic trick.
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
And if the only reason for that merge is "sync with upstream", then
no, that is not a sufficient reason. It has to have an actual real
reason, and it needs to be stated.
Quoted 6 lines
Quoted 1 line
Does this apply to the for-next area as well?
Largely, yes. Because the further away "for-next" gets from what you then eventually send me, if your for-next branch has odd useless merges, then either what you send me will have them too, or what you send me will be something entirely different and rebased.
I asked this question because I was going to try doing one continuous branch for ongoing future development. In that case, at an absolute minimum, one merge is required to get from one development window to the next. However, in addition to that one merge, I would argue that one of these two things should also be done:
1) I *should* merge the prior release's for-rc area into my for-next branch on an as-needed basis. This is so that we are developing and testing against a complete RDMA subsystem, not the RDMA subsystem as it was at -rc1 or -rc2 when we branched with all its bugs still intact.
or, optionally
2) I could merge the prior release's rc tags. It serves the same purpose (getting any -rc fixes I've sent you into the development branch), but also serves the purpose of getting other subsystem's fixes in as well so we won't be fighting against other bugs in our development and testing (this aspect is highly relevant with the net subsystem because of how tightly tied our subsystems are).
So, anyway, I still either have to branch off a new branch when I open my for-next area at each cycle, or I have to merge up to a current kernel. I'll stick with creating a new branch as it keeps the merge count down by one. I also still see value in option #2 above, even if you don't. I'll avoid it, but I do so noting my dissenting opinion.
Quoted 4 lines
Finally, the merges have a fundamental problem that is from past problems with rdma - in particular the history of mixing stuff up and having teams within one single company not even being able to talk or synchronize with each other.
Yes, some bad submissions happened in the past. There were two egregiously bad examples. Remember, though, that one of the things you yelled at me for during that time was for being unaware of the issues. You made it clear that my job is to stay on top of these things and make sure that they aren't happening again. I can't do that if I'm not pulling things together myself and making sure it's all good in the end.
Quoted 3 lines
If you need merges for conflict resolution, it indicates to me that rdma *still* has that issue where people fight over the direction and the drivers between different teams.
Conflicts happen, and they don't always indicate the issues that happened in the past. In fact, *most* of the time, they don't indicate anything along those lines. They're more an indicator of ongoing development across the subsystem. Major features, like SELinux support and namespace support, and even less invasive series that went through other trees like the RDMA cgroup support, are highly likely to conflict with your average typical development or bug fixes.
Quoted 5 lines
So while merges in general are something that should be avoided, when it comes to rdma in _particular_ I don't like seeing them, because I get the feeling that they are papering over the nasty development problems you guys have had, and are done as a way to handle the conflicts that were due to bad hygiene.
Aka, we're still on probation. I'll merge things up on a test branch and then throw it away. If I don't do the merge ups and check things, I'm not staying on top of the stack and doing my job. But if I submit the final product to you, then I'm preventing you from doing it yourself.
Quoted 6 lines
So the *one* kind of merge that is good is the "development of this topic branch is finished and done, let's merge it up". But that is never about time, that's about "I'm done with this series, it's good to go into my main branch". That's a "forward merge", where you really
merge the new and finished development tree into the base.
It's only a forward merge if my "main branch" is ahead of, or at the same base as, the development branch. That hasn't been the case in the last few cycles when I was merging a shared common Mellanox base that was also in Dave's tree. I've quit doing that effective now, so it won't be an issue, but, when I was doing it, I did what you call a back-merge because it cleaned up the subsequent merge from Dave and made understanding what my tree contained possible. Without it, it was a nightmare concoction off in la la land.
Quoted 4 lines
The back-merges, when you merge some unrelated development, is generally a bad sign. It inevitably happens for various reasons, but it should be seen as the exception, not the rule, and it should *always* have an explanation.
As I said above, pulling from Dave made it not so much an exception, but a necessary pre-step to clean up the merge I got from him. Otherwise, it was impossible to sort out what was his, what was yours, or where my tree now stood.
And in this particular case, remember that this was originally a branch intended for 4.13-rc cycles, so it was based on 4.13-rc2 or rc3. I would argue that sending patches that are against 4.13-rc2 into a 4.14- rc1 kernel, *as a maintainer*, is leaving too much to chance. An entire kernel of changes between your base and what you are submitting too? That seems irresponsible on my end. That's the reason I didn't document the back-merge on this pull request. It seemed (and to be honest, in spite of your comments, *still* seems) like the sane thing to do prior to submitting a pull request into 4.14-rc1. If I'm doing *my* job, I should *know* how this code is going to interact with the kernel I'm submitting it to. Clearly, you would prefer I had done a throw away branch instead of polluting my actual pull branch, but I don't believe for a second that I should have left things to chance and not verified how this code would interact with that kernel release worth of changes.
Signature · 8 lines
Doug Ledford <[email protected]> GPG KeyID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html