[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150222101737.GA24570@gmail.com>
Date: Sun, 22 Feb 2015 11:17:37 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Jiri Kosina <jkosina@...e.cz>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>,
Vojtech Pavlik <vojtech@...e.com>,
Peter Zijlstra <peterz@...radead.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...hat.com>,
Seth Jennings <sjenning@...hat.com>,
linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: live patching design (was: Re: [PATCH 1/3] sched: add
sched_task_call())
* Jiri Kosina <jkosina@...e.cz> wrote:
> On Sat, 21 Feb 2015, Ingo Molnar wrote:
>
> > > Plus a lot of processes would see EINTR, causing more
> > > havoc.
> >
> > Parking threads safely in user mode does not require
> > the propagation of syscall interruption to user-space.
>
> BTW how exactly do you envision this will work? Do I
> understand your proposal correctly that EINTR will be
> "handled" somewhere in the "live patching special signal
> handler" and then have the interrupted syscall restarted?
If you want to think about it in signal handling terms then
it's a new automatic in-kernel handler, which does not
actually return back to user-mode at all.
We can do it via the signals machinery (mainly to reuse all
the existing signal_pending() code in various syscalls), or
via new TIF flags like the user work machinery: the
principle is the same: interrupt out of syscall functions
into a central place and restart them, and return to
user-space later on as if a single call had been performed.
This necessarily means some changes to syscalls, but not
insurmountable ones - and checkpoint/restore support would
want to have similar changes in any case so we can hit two
birds with the same stone.
> Even without EINTR propagation to userspace, this would
> make a lot of new syscall restarts that were not there
> before, [...]
That's only a problem if you do system call restarts by
restarting them via user-space system call restart handler
- I'm not proposing that.
I'm suggesting a completely user-space transparent way to
execute long lasting system calls in a smarter way. I.e. it
would not be observable via strace either.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists