mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	the arch/x86 maintainers <x86@kernel.org>
Subject: Re: [GIT pull] perf/urgent for 5.7-rc2
Date: Mon, 20 Apr 2020 13:17:30 -0500	[thread overview]
Message-ID: <20200420181730.4bmggezf2zhu4ffb@treble> (raw)
In-Reply-To: <20200420174031.GM20730@hirez.programming.kicks-ass.net>

On Mon, Apr 20, 2020 at 07:40:31PM +0200, Peter Zijlstra wrote:
> On Mon, Apr 20, 2020 at 09:51:55AM -0700, Linus Torvalds wrote:
> > On Mon, Apr 20, 2020 at 12:48 AM Ingo Molnar <mingo@kernel.org> wrote:
> > >
> > > Fortunately, much of what objtool does against vmlinux.o can be
> > > parallelized in a rather straightforward fashion I believe, if we build
> > > with -ffunction-sections.
> > 
> > Well, I was actually thinking about a simpler model.
> > 
> > By "link time" I didn't mean "after final link". Yes, there may be
> > reasons to do it at that point too (to do any whole-program checks),
> > but that wasn't what I meant.
> > 
> > I meant literally doing it in the $(LD) and $(AR) phases, when you
> > still have lots of independent object files that you are just about to
> > link (or archive - do we even do that any more?) into one.
> > 
> > Then you'd parallelize exactly the same way we do now: one object file
> > at a time, and with no real change of semantics.
> > 
> > IOW, what I was thinking that instead of doing it as part of a final
> > step after the CC/AS, we'd do it as a preparatory step before the
> > LD/AR. Same exact operation, same exact target *.o files, just shifted
> > in time.
> 
> So my pet peeve is that when objtool errors, or crashes, the .o file
> gets deleted and it becomes really hard to debug the situation. I'm
> thinking that your suggestion would actually help with that too.

I do have the same pet peeve and I'm thinking we should just revert
644592d32837 ("objtool: Fail the kernel build on fatal errors") which
would ease most of the pain.  Those fatal errors don't really buy us
much IMO.  Agree?

> I just don't have enough Kbuild foo to even attempt this :/

It's an interesting idea, but it might have its own share of annoyances.

If you added something bad to a file, and just rebuilt that file, you
wouldn't see the objtool warning until later when you build the entire
kernel.  (Of course the same complaint would apply to vmlinux.o
validation.)  But the warning shows the .o file, which could be
confusing.

And for localized testing where you don't want to rebuild everything,
you'd have to figure out which archive belongs to the .o file you want
to run objtool on.  And then rebuilding that archive manually might not
work, for example I have no idea what's going wrong here:

  $ make arch/x86/kernel/built-in.a
    CALL    scripts/checksyscalls.sh
    CALL    scripts/atomic/check-atomics.sh
    DESCEND  objtool
    AR      arch/x86/kernel/built-in.a
  ar: arch/x86/kernel/fpu/built-in.a: No such file or directory
  make[2]: *** [scripts/Makefile.build:387: arch/x86/kernel/built-in.a] Error 1
  make[1]: *** [scripts/Makefile.build:488: arch/x86/kernel] Error 2
  make: *** [Makefile:1723: arch/x86] Error 2


Though I do really like Ingo's idea for parallelizing things for
vmlinux.o.

-- 
Josh


  reply	other threads:[~2020-04-20 18:17 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-19 13:56 [GIT pull] core/urgent " Thomas Gleixner
2020-04-19 13:56 ` [GIT pull] irq/urgent " Thomas Gleixner
2020-04-19 19:20   ` pr-tracker-bot
2020-04-19 13:56 ` [GIT pull] perf/urgent " Thomas Gleixner
2020-04-19 18:56   ` Linus Torvalds
2020-04-19 20:07     ` Josh Poimboeuf
2020-04-20  7:48       ` Ingo Molnar
2020-04-20  8:27         ` Peter Zijlstra
2020-04-22  7:45           ` Ingo Molnar
2020-04-22 11:56             ` Peter Zijlstra
2020-04-20 16:51         ` Linus Torvalds
2020-04-20 17:40           ` Peter Zijlstra
2020-04-20 18:17             ` Josh Poimboeuf [this message]
2020-04-20 19:17               ` Peter Zijlstra
2020-04-20 19:21               ` Linus Torvalds
2020-04-20 19:36                 ` Josh Poimboeuf
2020-04-19 19:20   ` pr-tracker-bot
2020-04-19 13:56 ` [GIT pull] sched/urgent " Thomas Gleixner
2020-04-19 19:20   ` pr-tracker-bot
2020-04-19 13:56 ` [GIT pull] timers/urgent " Thomas Gleixner
2020-04-19 19:20   ` pr-tracker-bot
2020-04-19 13:56 ` [GIT pull] x86/urgent " Thomas Gleixner
2020-04-19 19:20   ` pr-tracker-bot
2020-04-19 19:20 ` [GIT pull] core/urgent " pr-tracker-bot

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=20200420181730.4bmggezf2zhu4ffb@treble \
    --to=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®