mbox series

[0/2] yank: Always link full yank code

Message ID cover.1616521341.git.lukasstraub2@web.de
Headers show
Series yank: Always link full yank code | expand

Message

Lukas Straub March 23, 2021, 5:52 p.m. UTC
Hello Everyone,
These patches remove yank's dependency on qiochannel and always link it in.
Please Review.

Regards,
Lukas Straub

Lukas Straub (2):
  yank: Remove dependency on qiochannel
  yank: Always link full yank code

 MAINTAINERS                   |  2 +-
 chardev/char-socket.c         | 21 ++++++++++++++-------
 include/qemu/yank.h           | 10 ----------
 migration/channel.c           |  6 ++++--
 migration/meson.build         |  1 +
 migration/multifd.c           |  3 ++-
 migration/qemu-file-channel.c |  3 ++-
 migration/yank_functions.c    | 20 ++++++++++++++++++++
 migration/yank_functions.h    | 17 +++++++++++++++++
 stubs/meson.build             |  1 -
 stubs/yank.c                  | 29 -----------------------------
 util/meson.build              |  2 +-
 util/yank.c                   |  8 --------
 13 files changed, 62 insertions(+), 61 deletions(-)
 create mode 100644 migration/yank_functions.c
 create mode 100644 migration/yank_functions.h
 delete mode 100644 stubs/yank.c

--
2.30.2

Comments

Daniel P. Berrangé March 23, 2021, 7:09 p.m. UTC | #1
On Tue, Mar 23, 2021 at 06:52:19PM +0100, Lukas Straub wrote:
> Hello Everyone,
> These patches remove yank's dependency on qiochannel and always link it in.
> Please Review.

It would be useful if the cover letter or commit messages explained
to potential reviewers why this is being changed... The first patch
feels like a regression to me, without seeing an explanation why
it is desirable.


Regards,
Daniel
Lukas Straub March 24, 2021, 11:22 a.m. UTC | #2
On Tue, 23 Mar 2021 19:09:15 +0000
Daniel P. Berrangé <berrange@redhat.com> wrote:

> On Tue, Mar 23, 2021 at 06:52:19PM +0100, Lukas Straub wrote:
> > Hello Everyone,
> > These patches remove yank's dependency on qiochannel and always link it in.
> > Please Review.  
> 
> It would be useful if the cover letter or commit messages explained
> to potential reviewers why this is being changed... The first patch
> feels like a regression to me, without seeing an explanation why
> it is desirable.

Yes, sorry. There are two reasons for this patchset:
-To exercise the full yank code (with checks for registering and unregistering
 of yank functions and instances) in existing tests and in the new yank test
 (https://lore.kernel.org/qemu-devel/cover.1616521487.git.lukasstraub2@web.de/)
-To replace "[PATCH] yank: Avoid linking into executables that don't want it"
 (https://lore.kernel.org/qemu-devel/20210316135907.3646901-1-armbru@redhat.com/)
 Now we always link in yank, but without pulling in other dependencies.

Regards,
Lukas Straub

> 
> Regards,
> Daniel



--
Daniel P. Berrangé March 24, 2021, 11:36 a.m. UTC | #3
On Wed, Mar 24, 2021 at 12:22:42PM +0100, Lukas Straub wrote:
> On Tue, 23 Mar 2021 19:09:15 +0000
> Daniel P. Berrangé <berrange@redhat.com> wrote:
> 
> > On Tue, Mar 23, 2021 at 06:52:19PM +0100, Lukas Straub wrote:
> > > Hello Everyone,
> > > These patches remove yank's dependency on qiochannel and always link it in.
> > > Please Review.  
> > 
> > It would be useful if the cover letter or commit messages explained
> > to potential reviewers why this is being changed... The first patch
> > feels like a regression to me, without seeing an explanation why
> > it is desirable.
> 
> Yes, sorry. There are two reasons for this patchset:
> -To exercise the full yank code (with checks for registering and unregistering
>  of yank functions and instances) in existing tests and in the new yank test
>  (https://lore.kernel.org/qemu-devel/cover.1616521487.git.lukasstraub2@web.de/)
> -To replace "[PATCH] yank: Avoid linking into executables that don't want it"
>  (https://lore.kernel.org/qemu-devel/20210316135907.3646901-1-armbru@redhat.com/)
>  Now we always link in yank, but without pulling in other dependencies.

Conceptually, the real world usage of yank is in combination with parts
of QEMU doing I/O, and so they will always have the "io" subsystem
available. Thus it feels wrong to be refactoring this to avoid an
"io" dependancy.  I think this probably suggests that the yank code
shouldn't be in libqemuutil.la, but instead part of the "io" subsystem
to make the association/dependency explicit


Regards,
Daniel
Lukas Straub March 24, 2021, 12:09 p.m. UTC | #4
On Wed, 24 Mar 2021 11:36:13 +0000
Daniel P. Berrangé <berrange@redhat.com> wrote:

> On Wed, Mar 24, 2021 at 12:22:42PM +0100, Lukas Straub wrote:
> > On Tue, 23 Mar 2021 19:09:15 +0000
> > Daniel P. Berrangé <berrange@redhat.com> wrote:
> >   
> > > On Tue, Mar 23, 2021 at 06:52:19PM +0100, Lukas Straub wrote:  
> > > > Hello Everyone,
> > > > These patches remove yank's dependency on qiochannel and always link it in.
> > > > Please Review.    
> > > 
> > > It would be useful if the cover letter or commit messages explained
> > > to potential reviewers why this is being changed... The first patch
> > > feels like a regression to me, without seeing an explanation why
> > > it is desirable.  
> > 
> > Yes, sorry. There are two reasons for this patchset:
> > -To exercise the full yank code (with checks for registering and unregistering
> >  of yank functions and instances) in existing tests and in the new yank test
> >  (https://lore.kernel.org/qemu-devel/cover.1616521487.git.lukasstraub2@web.de/)
> > -To replace "[PATCH] yank: Avoid linking into executables that don't want it"
> >  (https://lore.kernel.org/qemu-devel/20210316135907.3646901-1-armbru@redhat.com/)
> >  Now we always link in yank, but without pulling in other dependencies.  
> 
> Conceptually, the real world usage of yank is in combination with parts
> of QEMU doing I/O, and so they will always have the "io" subsystem
> available. Thus it feels wrong to be refactoring this to avoid an
> "io" dependancy.  I think this probably suggests that the yank code
> shouldn't be in libqemuutil.la, but instead part of the "io" subsystem
> to make the association/dependency explicit

Yes, makes sense. On the other hand I think that the yank functions should be
separate from the yank core anyway.

Regards,
Lukas Straub

> 
> Regards,
> Daniel



--