git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Kyle Moffett <mrmacman_g4@mac.com>,
	Martin Langhoff <martin.langhoff@gmail.com>,
	Luben Tuikov <ltuikov@yahoo.com>,
	"Brown, Len" <len.brown@intel.com>,
	"Luck, Tony" <tony.luck@intel.com>,
	Junio C Hamano <junkio@cox.net>,
	"David S. Miller" <davem@davemloft.net>,
	linux-acpi@vger.kernel.org,
	LKML Kernel <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: git pull on Linux/ACPI release tree
Date: Tue, 10 Jan 2006 11:28:58 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0601101111110.4939@g5.osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0601101048440.4939@g5.osdl.org>



On Tue, 10 Jan 2006, Linus Torvalds wrote:
> 
> Now, the git history is _not_ really a two-dimensional surface, so it's 
> just an analogy, not an exact identity. But from a visualization 
> standpoint, it's a good way to think of each "git bisect" as adding a 
> _line_ on the surface rather than a point on a linear line.

Actually, the way I think of it is akin to the "light cones" in physics. A 
point in space-time doesn't define a fully ordered "before and after": but 
it _does_ describe a "light cone" which tells you what is reachable from 
that point, and what that point reaches. Within those cones, that 
particular point ("commit") has a strict ordering.

And exactly as in physics, in git there's a lot of space that is _not_ 
ordered by that commit. And the way to bisect is basically to find the 
right points in "git space" to create the right "light cone" that you 
find the point where the git space that is reachable from that commit has 
the same volume as the git space that isn't reachable.

And maybe that makes more sense to you (if you're into physics), or maybe 
it makes less sense to you.

Now, since we always search the "git space" in the cone that is defined by 
"reachable from the bad commit, but not reachable from any good commit", 
the way we handle "bad" and "good" is actually not a mirror-image. If we 
fine a new _bad_ commit, we know that it was reachable from the old bad 
commit, and thus the old bad commit is now uninteresting: the new bad 
commit forms a "past light cone" that is a strict subset of the old one, 
so we can totally discard the old bad commit from any future 
consideration. It doesn't tell us anything new.

In contrast, if we find a new _good_ commit, the "past light cone" (aka 
"set of commits reachable from it") is -not- necessarily a proper superset 
of the previous set of good commits, so when we find a good commit, we 
still need to carry the _other_ good commits around, and the "known good" 
universe is the _union_ of all the "good commit past lightcones".

Then the "unknown space" is the set difference of the "past lightcone of 
the bad commit" and of this "union of past lightcones of good commits". 
It's the space that is reachable from the known-bad commit, but not 
reachable from any known-good commit.

So this means that when doing bisection, what we want to do is find the 
point in git space that has _new_ "reachability" within that unknown space 
that is as close to half that volume as space as possible. And that's 
exactly what "git-rev-list --bisect" calculates.

So every time, we try to either move the "known bad" light-cone down in 
time in the unknown space, _or_ we add a new "known good" light-cone. In 
either case, the "unknown git space" keeps shrinking by half each time.

("by half" is not exact, because git space is not only quanticized, it 
also has a rather strange "distance function". In other words, we're 
talking about a rather strange space. The good news is that the space is 
small enough that we can just enumerate every quantum and simply 
calculate the volume it defines in that space. IOW, we do a very 
brute-force thing, and it works fine).

			Linus

  reply	other threads:[~2006-01-10 19:30 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-09  8:05 git pull on Linux/ACPI release tree Brown, Len
2006-01-09 16:47 ` Linus Torvalds
2006-01-09 16:57   ` Linus Torvalds
2006-01-09 22:51     ` Luben Tuikov
2006-01-09 23:07       ` Linus Torvalds
2006-01-09 23:34         ` Martin Langhoff
2006-01-10  2:50       ` Linus Torvalds
2006-01-10  3:04         ` Junio C Hamano
     [not found]         ` <Pine.LNX.4.64.0601091845160.5588-hNm40g4Ew95AfugRpC6u6w@public.gmane.org>
2006-01-10  6:33           ` Kyle Moffett
     [not found]             ` <99D82C29-4F19-4DD3-A961-698C3FC0631D-ee4meeAH724@public.gmane.org>
2006-01-10  6:38               ` Martin Langhoff
2006-01-10 18:05                 ` Kyle Moffett
2006-01-10 18:27                   ` Linus Torvalds
     [not found]                     ` <Pine.LNX.4.64.0601101015260.4939-hNm40g4Ew95AfugRpC6u6w@public.gmane.org>
2006-01-10 18:45                       ` Johannes Schindelin
2006-01-10 19:01                         ` Linus Torvalds
2006-01-10 19:28                           ` Linus Torvalds [this message]
2006-01-10 19:38                           ` Johannes Schindelin
2006-01-10 20:11                             ` Linus Torvalds
2006-01-10 20:28                               ` Linus Torvalds
2006-01-10 20:47                               ` Johannes Schindelin
2006-01-13 23:35                           ` Matthias Urlichs
     [not found]                   ` <252A408D-0B42-49F3-92BC-B80F94F19F40-ee4meeAH724@public.gmane.org>
2006-01-11  3:32                     ` Luben Tuikov
2006-01-09 20:06   ` Junio C Hamano
     [not found]     ` <7vu0cdjhd1.fsf-u5dp/1a/izZijMVVUgEtmwqrb7wDvxM8@public.gmane.org>
2006-01-10 15:31       ` Alex Riesen
2006-01-12  7:33         ` [PATCH] checkout: automerge local changes while switching branches Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2006-01-09  7:34 git pull on Linux/ACPI release tree Brown, Len
     [not found] ` <F7DC2337C7631D4386A2DF6E8FB22B3005A136FE-N2PTB0HCzHKkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2006-01-09 10:11   ` Martin Langhoff
2006-01-09 12:31     ` Johannes Schindelin
2006-01-09  6:27 Brown, Len
2006-01-09  6:13 Brown, Len
2006-01-09  5:55 linux
2006-01-09  5:53 Brown, Len
2006-01-09  6:08 ` Martin Langhoff
2006-01-09  6:13   ` Linus Torvalds
2006-01-09  6:46     ` Junio C Hamano
2006-01-08 18:28 Brown, Len
     [not found] ` <F7DC2337C7631D4386A2DF6E8FB22B3005A13505-N2PTB0HCzHKkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2006-01-08 19:19   ` Martin Langhoff
     [not found]     ` <46a038f90601081119r39014fbi995cc8b6e95774da-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2006-01-08 19:33       ` Junio C Hamano
2006-01-08 19:57         ` Linus Torvalds
2006-01-08 20:50           ` Tony Luck
2006-01-08 19:56     ` Linus Torvalds
2006-01-08 20:35       ` David S. Miller
2006-01-08 21:20       ` Luben Tuikov
2006-01-09  1:13         ` Linus Torvalds
2006-01-08 19:41 ` Linus Torvalds
     [not found]   ` <Pine.LNX.4.64.0601081111190.3169-hNm40g4Ew95AfugRpC6u6w@public.gmane.org>
2006-01-08 23:06     ` Adrian Bunk
     [not found]       ` <20060108230611.GP3774-HeJ8Db2Gnd6zQB+pC5nmwQ@public.gmane.org>
2006-01-08 23:53         ` Willy Tarreau
2006-01-09  3:26         ` Linus Torvalds
     [not found]           ` <Pine.LNX.4.64.0601081909250.3169-hNm40g4Ew95AfugRpC6u6w@public.gmane.org>
2006-01-09  4:34             ` Martin Langhoff
2006-01-10 20:19           ` Adrian Bunk
     [not found]             ` <20060110201909.GB3911-HeJ8Db2Gnd6zQB+pC5nmwQ@public.gmane.org>
2006-01-10 20:31               ` Linus Torvalds
2006-01-10 20:33             ` Martin Langhoff
2006-01-11  0:26               ` Andreas Ericsson
2006-01-12  1:37             ` Greg KH
     [not found]               ` <20060112013706.GA3339-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2006-01-12 16:10                 ` Catalin Marinas
2006-01-13 14:50               ` Adrian Bunk
2006-01-08  7:47 Brown, Len
2006-01-08  8:16 ` Catalin Marinas
2006-01-08  8:16 ` David S. Miller
2006-01-08  8:44   ` Junio C Hamano
     [not found] ` <F7DC2337C7631D4386A2DF6E8FB22B3005A13489-N2PTB0HCzHKkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2006-01-08 19:10   ` Linus Torvalds
2006-01-09  0:48     ` Al Viro
     [not found]       ` <20060109004844.GG27946-rfM+Q5joDG/XmaaqVzeoHQ@public.gmane.org>
2006-01-09  3:50         ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0601101111110.4939@g5.osdl.org \
    --to=torvalds@osdl.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=akpm@osdl.org \
    --cc=davem@davemloft.net \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ltuikov@yahoo.com \
    --cc=martin.langhoff@gmail.com \
    --cc=mrmacman_g4@mac.com \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).