Re: [PATCH v2 5/6] x86: Pass kernel thread parameters in fork_frame

Ingo Molnar
2016-07-09T12:01:36Z

* Brian Gerst <brgerst@gmail.com> wrote:

> On Mon, Jun 20, 2016 at 11:14 AM, Borislav Petkov <bp@alien8.de> wrote:
> > On Mon, Jun 20, 2016 at 11:01:02AM -0400, Brian Gerst wrote:
> >> The idea was to put the uncommon case (kernel thread) out of line for
> >> performance reasons.
> >
> > A comment saying so wouldn't hurt...
>
> This is a fairly common pattern. Do we have to document every case of it?

Yeah, would be good to do that in general, so that people can re-evaluate whether
'this is rare' is still true years down the line. For newly touched code it makes
sense to add a minimal comment that explains what is rare about the branch and so.

Thanks,

Ingo