Re: [PATCH 00/21] kGraft

From: Jiri Kosina
Date: Wed Jun 25 2014 - 11:54:59 EST


On Wed, 25 Jun 2014, One Thousand Gnomes wrote:

> > this is a repost of the second round of RFC on kGraft, the linux
> > kernel online patching developed at SUSE. This repost only widened the
> > target audience for broader review, no code change happened.
>
> - wait_event_freezable(khubd_wait,
> + wait_event_freezable(khubd_wait,
> ({ kgr_task_safe(current);
>
> The changes are somewhat ugly with all the kgraft crap leaking into plces
> like jbd and freezer and usb. That says to me its not well isolated and
> there must be a better way of hiding that kgr stuff so we don't have to
> kepe putting more code into all the kthreads, and inevitably missing them
> or have people getting it wrong.

Tejun commented on this very issue during the first RFC submission a
couple weeks ago. Part of his proposal was actually to take this as a good
pretext to review the existing kernel threads, as the idea is that a big
portion of those could easily be converted to workqueues.

It of course has its own implications, such as not being able to
prioritize that easily, but there is probably a lot of low-hanging fruits
where driver authors and their grandmas have been creating kthreads where
workqueue would suffice.

But it's a very long term goal, and it's probably impractical to make
kGraft dependent on it.

> You add instructions to various hotpaths (despite the CONFIG comment).

Kernel entry is hidden behind _TIF_WORK_SYSCALL_ENTRY and
_TIF_ALLWORK_MASK, so it doesn't add any overhead if kGraft is not
enabled. What other hot paths do you refer to?

> Don't get me wrong - I'd like a good working ksplice/graft !

Thanks Alan,

--
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/