From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751415AbdCMGld (ORCPT ); Mon, 13 Mar 2017 02:41:33 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:36326 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750726AbdCMGl0 (ORCPT ); Mon, 13 Mar 2017 02:41:26 -0400 MIME-Version: 1.0 X-Originating-IP: [2a02:168:56c9:0:decc:6e78:7e96:b452] In-Reply-To: <20170312220121.GB30510@kroah.com> References: <20170312194440.GA32007@kroah.com> <20170312204621.vzvmzgnuio2fqmr7@phenom.ffwll.local> <20170312220121.GB30510@kroah.com> From: Daniel Vetter Date: Mon, 13 Mar 2017 07:40:50 +0100 X-Google-Sender-Auth: QNRM3Dq0Eas9dVBzfSvoLre7njQ Message-ID: Subject: Re: [Intel-gfx] The i915 stable patch marking is totally broken To: Greg KH Cc: Daniel Vetter , Jani Nikula , intel-gfx , Linux Kernel Mailing List , stable Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Mar 12, 2017 at 11:01 PM, Greg KH wrote: >> So I blame this on flight level 350, but we discussed this at kernel >> summit. Every patch we cherry-pick over comes with a "cherry-picked from >> $sha1" line, as long as you ignore any such sha1 as duplicate you won't >> see the same patch twice. > > I tried that, but that cherry-pick number doesn't seem to match up with > anything in Linus's tree. Where are those numbers coming from? > > Or there aren't numbers at all. Look at commit: > 8726f2faa371514fba2f594d799db95203dfeee0. It just showed up in Linus's > tree, and there's no "cherry-pick" number in there. It ended up in > 4.9.7. > > Hm, ok, you want me to look at the commit id and then search to see if > it's already been merged "before". Ah, that's crazy. So I need to do > that for every i915 patch? Search backwards? Ugh, that's a mess, no > wonder I couldn't figure it out... Our cherry-pick sha1 work exactly like yours: They don't make sense when you only look at the tree a patch has been cherry-picked _to_, since they're the sha1 from the tree they've been cherry-picked _from_. When you clone a fresh copy of your stable tree then the cherry-pick numbers also point nowhere. Only once you've pulled the future tree they're from (Linus' git in your case) do they make sense. Same for our cherry-picks, except the future tree isn't Linus' git (we'd have managed to make sha1 collisions cheaply otherwise ...) but the future Linus' git tree. Which is maintained by Stephen Rothwell in linux-next. As soon as you make sure you have the latest linux-next.git they will all resolve to something meaningful. Not crazy going on at all :-) >> Iirc you said you'll implement this in your scripts, and as long as we >> never break this rule, you'll be fine. Since you seemed to have agreed to >> a solution that would solve all your headaches I didn't bother doing >> any changes on our side here. > > So if a commit says "cherry-pick", I guess I can always assume it's safe > to add, right? If not, _then_ I have to run the "search backwards" > logic, right? > > Ok, let me think about this a bit to see if that's possible to script... Yes, but it shouldn't be hard to avoid the linear search: 1. make sure you have the latest linux-next (to make sure all the sha1 commit-ish resolve to something meaningful). You probably want to do that before you board a plane :-) 2. When you parse an upstream commit that says "commit cherry-picked from $original_sha1", then add a git note for $original_sha1 that you've seen it already and can ignore it. 3. Run that script over v4.9..v4.10 to backfill your git notes branch. 4. Make sure you sync that git notes branch (and if you use git notes already, just use a different git notes branch name to avoid conflicts). 5. When you spot a patch with cc: stable, check for a git note that says you've looked at it (or one of it's cherry-picks) already, if so, silently ignore it. That should massively drop the ratio of failed patches, at least every time I look at your failed patche mail I think they're just double-applied ones. There's ofc a few patches that fail to apply, 3 months of drm/i915 development even wreak the context of simple bugfixes sometimes, but most are not (which is btw why you don't get replies for most of these). -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch