Re: [PATCH v4 2/2] livepatch: force transition to finish

2017-11-21 Thread Petr Mladek
On Mon 2017-11-20 16:57:19, Miroslav Benes wrote: > On Wed, 15 Nov 2017, Miroslav Benes wrote: > > > If a task sleeps in a set of patched functions uninterruptedly, it could > > block the whole transition indefinitely. Thus it may be useful to clear > > its TIF_PATCH_PENDING to allow the process

Re: [PATCH v4 2/2] livepatch: force transition to finish

2017-11-21 Thread Petr Mladek
On Mon 2017-11-20 16:57:19, Miroslav Benes wrote: > On Wed, 15 Nov 2017, Miroslav Benes wrote: > > > If a task sleeps in a set of patched functions uninterruptedly, it could > > block the whole transition indefinitely. Thus it may be useful to clear > > its TIF_PATCH_PENDING to allow the process

Re: [PATCH v4 2/2] livepatch: force transition to finish

2017-11-20 Thread Jiri Kosina
On Tue, 21 Nov 2017, Pavel Machek wrote: > Just disable rmmod in case of forced removal. Yeah, well, that's basically what the patch does :) Thanks, -- Jiri Kosina SUSE Labs

Re: [PATCH v4 2/2] livepatch: force transition to finish

2017-11-20 Thread Jiri Kosina
On Tue, 21 Nov 2017, Pavel Machek wrote: > Just disable rmmod in case of forced removal. Yeah, well, that's basically what the patch does :) Thanks, -- Jiri Kosina SUSE Labs

Re: [PATCH v4 2/2] livepatch: force transition to finish

2017-11-20 Thread Pavel Machek
Hi! > > We can also try to improve later. We could remember all forced tasks > > and reenable rmmod once those tasks are really migrated ("shadow > > migration"). > > NACK :-) Forcing should hopefully be a rare event, not worth the > trouble to try to keep track of that IMO. Just disable

Re: [PATCH v4 2/2] livepatch: force transition to finish

2017-11-20 Thread Pavel Machek
Hi! > > We can also try to improve later. We could remember all forced tasks > > and reenable rmmod once those tasks are really migrated ("shadow > > migration"). > > NACK :-) Forcing should hopefully be a rare event, not worth the > trouble to try to keep track of that IMO. Just disable

Re: [PATCH v4 2/2] livepatch: force transition to finish

2017-11-20 Thread Josh Poimboeuf
On Tue, Nov 21, 2017 at 12:11:14AM +0100, Jiri Kosina wrote: > On Tue, 21 Nov 2017, Jiri Kosina wrote: > > > I agree; the only thing I think really has to be done is putting a comment > > there, explaining why forcing implies infinite module reference (and also > > perhaps making it therefore

Re: [PATCH v4 2/2] livepatch: force transition to finish

2017-11-20 Thread Josh Poimboeuf
On Tue, Nov 21, 2017 at 12:11:14AM +0100, Jiri Kosina wrote: > On Tue, 21 Nov 2017, Jiri Kosina wrote: > > > I agree; the only thing I think really has to be done is putting a comment > > there, explaining why forcing implies infinite module reference (and also > > perhaps making it therefore

Re: [PATCH v4 2/2] livepatch: force transition to finish

2017-11-20 Thread Jiri Kosina
On Tue, 21 Nov 2017, Jiri Kosina wrote: > I agree; the only thing I think really has to be done is putting a comment > there, explaining why forcing implies infinite module reference (and also > perhaps making it therefore even more obvious from documentation, that > this really is a

Re: [PATCH v4 2/2] livepatch: force transition to finish

2017-11-20 Thread Jiri Kosina
On Tue, 21 Nov 2017, Jiri Kosina wrote: > I agree; the only thing I think really has to be done is putting a comment > there, explaining why forcing implies infinite module reference (and also > perhaps making it therefore even more obvious from documentation, that > this really is a

Re: [PATCH v4 2/2] livepatch: force transition to finish

2017-11-20 Thread Jiri Kosina
On Mon, 20 Nov 2017, Miroslav Benes wrote: > While working on "immediate" removal, I realized we had the similar > problem here with modules removal. There is no way out of the rabbit hole. > > If a patch is forced, we obviously cannot say there is no task sleeping in > the old code. This

Re: [PATCH v4 2/2] livepatch: force transition to finish

2017-11-20 Thread Jiri Kosina
On Mon, 20 Nov 2017, Miroslav Benes wrote: > While working on "immediate" removal, I realized we had the similar > problem here with modules removal. There is no way out of the rabbit hole. > > If a patch is forced, we obviously cannot say there is no task sleeping in > the old code. This

Re: [PATCH v4 2/2] livepatch: force transition to finish

2017-11-20 Thread Josh Poimboeuf
On Mon, Nov 20, 2017 at 04:57:19PM +0100, Miroslav Benes wrote: > On Wed, 15 Nov 2017, Miroslav Benes wrote: > > > If a task sleeps in a set of patched functions uninterruptedly, it could > > block the whole transition indefinitely. Thus it may be useful to clear > > its TIF_PATCH_PENDING to

Re: [PATCH v4 2/2] livepatch: force transition to finish

2017-11-20 Thread Josh Poimboeuf
On Mon, Nov 20, 2017 at 04:57:19PM +0100, Miroslav Benes wrote: > On Wed, 15 Nov 2017, Miroslav Benes wrote: > > > If a task sleeps in a set of patched functions uninterruptedly, it could > > block the whole transition indefinitely. Thus it may be useful to clear > > its TIF_PATCH_PENDING to

Re: [PATCH v4 2/2] livepatch: force transition to finish

2017-11-20 Thread Miroslav Benes
On Wed, 15 Nov 2017, Miroslav Benes wrote: > If a task sleeps in a set of patched functions uninterruptedly, it could > block the whole transition indefinitely. Thus it may be useful to clear > its TIF_PATCH_PENDING to allow the process to finish. > > Admin can do that now by writing to force

Re: [PATCH v4 2/2] livepatch: force transition to finish

2017-11-20 Thread Miroslav Benes
On Wed, 15 Nov 2017, Miroslav Benes wrote: > If a task sleeps in a set of patched functions uninterruptedly, it could > block the whole transition indefinitely. Thus it may be useful to clear > its TIF_PATCH_PENDING to allow the process to finish. > > Admin can do that now by writing to force