an idea about parallel doing do_patch
In our peoject,we have suffered a lot from long duration of do_patch of linux kernel(3000+ patches). I found that one do_patch task uses only one process. So I modify a llittle do do_patch task. Here is my idea:
1.analyse the patches,only getting the modified files of each patch.
2.cluster all patches according to the files modified( patch no.1 modifies file A,B ,patch no.2 modifies file A, patch no.3 modifies file C,then we cluster patch no.1 and no.2 as a group, patch no.3 as another group) , here I use union-find to do the cluster 3.assign one group on one process
But I met the problem of probabilistic missing patches.
Anyone has any comments about my idea?
Hi,
Quoted 6 lines · On Mon, Sep 07, 2020 at 01:27:29AM -0700, zhangyifan46 via…
In our peoject,we have suffered a lot from long duration of
do_patchof linux kernel(3000+ patches). I found that onedo_patchtask uses only one process. So I modify a llittle dodo_patchtask. Here is my idea:
1.analyse the patches,only getting the modified files of each patch.
2.cluster all patches according to the files modified( patch no.1 modifies file A,B ,patch no.2 modifies file A, patch no.3 modifies file C,then we cluster patch no.1 and no.2 as a group, patch no.3 as another group) , here I use union-find to do the cluster 3.assign one group on one process
But I met the problem of probabilistic missing patches.
Anyone has any comments about my idea?
I think having large patch sets in meta layers and applied with bitbake are not the right solution. I would create a custom git repo and branch for large forks/branches like this.
Possibly it could also be possible to apply patches with git through mbox files, but I don't think this will much faster than bitbake.
Hope this helps,
-Mikko
Quoted 1 line
Hi, please reply to mailing list too.
Quoted 3 lines · On Mon, Sep 07, 2020 at 01:43:37AM -0700, [email protected] wrote:
Sure using git repo is best solution.
But I am working in a company and we use local codes(tar + patches).
right or wrong, I think if we can improve the efficiency of patching, it is better than nothing.
Well, here I would really move away from tar + patches approach and move things to git. I've been there and forced BSP vendors to provide full git trees with proper commit messages and history linked to upstream kernel.org stable point releases. We have these in our project and product requirements. I suggest talking to the vendors and moving to git.
Tar and patches was ok in the 90's but not anymore large change sets.
Parallelizing do_patch() could be a nice addition but needs serious testing and validation because bugs could have really serious effects.
Cheers,
-Mikko
Quoted 20 lines · Mikko Rapeli
Hi, please reply to mailing list too.
Quoted 5 lines · On Mon, Sep 07, 2020 at 01:43:37AM -0700, [email protected] wrote:
Sure using git repo is best solution.
But I am working in a company and we use local codes(tar + patches).
right or wrong, I think if we can improve the efficiency of patching, it is better than nothing.Well, here I would really move away from tar + patches approach and move things to git.
I've been there and forced BSP vendors to provide full git trees with proper commit messages
and history linked to upstream kernel.org stable point releases. We have these
in our project and product requirements. I suggest talking to the vendors and moving
to git.
Quoted 5 lines
Tar and patches was ok in the 90's but not anymore large change sets.
Parallelizing
do_patch()could be a nice addition but needs serious testing and validation because bugs could have really serious effects.
I agree with Mikko, that do_patch isn't really designed to handle 3000 item queues of patches.
If you really want to do what you're doing, I'd write it as a replacement for quilt which has parallelism. You'd then perhaps be able to swap that in with fewer changes to OE-Core. I'd also want to very carefully analyse where the time bottlebeck is in do_patch as I suspect it may be on process execution overhead rather than in the patch tool itself.
I'm not really very interested in changing do_patch in the core to do parallelism since this is a very specific corner case where you really should be doing something else entirely (use git).
Cheers,
Richard
Quoted 10 lines · Mikko Rapeli
Hi,
Quoted 6 lines · On Mon, Sep 07, 2020 at 01:27:29AM -0700, zhangyifan46 via…
In our peoject,we have suffered a lot from long duration of
do_patchof linux kernel(3000+ patches). I found that onedo_patchtask uses only one process. So I modify a llittle dodo_patchtask. Here is my idea:
1.analyse the patches,only getting the modified files of each patch.
2.cluster all patches according to the files modified( patch no.1 modifies file A,B ,patch no.2 modifies file A, patch no.3 modifies file C,then we cluster patch no.1 and no.2 as a group, patch no.3 as another group) , here I use union-find to do the cluster 3.assign one group on one process
But I met the problem of probabilistic missing patches.
Anyone has any comments about my idea?
Quoted 4 lines
I think having large patch sets in meta layers and applied with bitbake are not the right solution. I would create a custom git repo and branch for large forks/branches like this.
right, I think thousands of patches via patch management tools like quilt is going to be cumbersome, I think best approach here would be to fork kernel tree and maintain your patches on a branch. It will ease out maintenance as well as build times. Ofcourse it means you have to adopt a good process to manage your kernel branch so it does not spin into a maintenance problems either.
Quoted 12 lines
Possibly it could also be possible to apply patches with git through mbox files, but I don't think this will much faster than bitbake.
Hope this helps,
-Mikko
Quoted 3 lines