lkml.org 
[lkml]   [2015]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 6/9] livepatch: create per-task consistency model
On Thu, 12 Feb 2015, Peter Zijlstra wrote:

> > > FWIW, the barriers in klp_update_task_universe() and
> > > klp_set_universe_goal() look like complete crack, and their comments are
> > > seriously deficient.
> >
> > These particular barriers seem correct to me; you basically need to make
> > sure that whenever a thread with TIF_KLP_NEED_UPDATE goes through
> > do_notify_resume(), it sees proper universe number to be converted to.
>
> I'm not seeing how they're going to help with that.
>
> The comment should describe the data race and how the barriers are
> making it not happen.
>
> putting wmb after a store and rmb before a read doesn't avoid the reader
> seeing the old value in any universe I know of.

This is about dependency between klp_universe_goal and TIF_KLP_NEED_UPDATE
in threadinfo flags.

What is confusing here is that threadinfo flags are not set in
klp_set_universe_goal() directly, but in the caller
(klp_start_transition()).

I fully agree with you that this deserves better comment though.

--
Jiri Kosina
SUSE Labs


\
 
 \ /
  Last update: 2015-02-12 14:01    [W:0.142 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site