live-patching.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [help] Confusion on livepatch's per-task consistency model
@ 2020-03-02  8:45 JeffleXu
  2020-03-02 10:12 ` Petr Mladek
  2020-03-02 10:36 ` Nicolai Stange
  0 siblings, 2 replies; 6+ messages in thread
From: JeffleXu @ 2020-03-02  8:45 UTC (permalink / raw)
  To: jpoimboe; +Cc: live-patching

Hello guys,


I'm new to livepatch world and now I'm a little confused with livepatch's

per-task consistency model which is introduced by [1]. I've also readed the

discussion on mailing list [2], which introduces shadow variable to handle

data layout and semantic changes. But there's still some confusion with this

per-task consistency model.


According to the model, there will be scenario where old function and new

function can co-exist, though for a single thread, it sees either all new

functions or all old functions.


I can't understand why Vojtech said that 'old func processing new data' was

impossible. Assuming a scenario where a process calls func-A to submit a

work request (inserted into a global list), and then a kthread is 
responsible

for calling func-B to process all work requests in the list. What if 
this process

has finished the transition (sees new func-A) while kthread still sees 
the old func-B?

In this case, old func-B has to process new data. If there's some lock 
semantic

changes in func-A and func-B, then old func-B has no way identifying the 
shadow

variable labeled by new func-A.


Please tell me if I missed something, and any suggestions will be 
appreciated. ;)


Thanks.


[1] livepatch: change to a per-task consistency model

(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.6-rc3&id=d83a7cb375eec21f04c83542395d08b2f6641da2)


[2] https://lkml.kernel.org/r/20141107140458.GA21774@suse.cz


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-03-02 16:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-02  8:45 [help] Confusion on livepatch's per-task consistency model JeffleXu
2020-03-02 10:12 ` Petr Mladek
2020-03-02 12:56   ` JeffleXu
2020-03-02 10:36 ` Nicolai Stange
2020-03-02 13:19   ` JeffleXu
2020-03-02 16:58     ` Nicolai Stange

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).