[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 14/25] memory: Add Error** argument to the global_dirty_lo
From: |
Peter Xu |
Subject: |
Re: [PATCH v4 14/25] memory: Add Error** argument to the global_dirty_log routines |
Date: |
Mon, 18 Mar 2024 12:31:10 -0400 |
On Mon, Mar 18, 2024 at 05:08:13PM +0100, Cédric Le Goater wrote:
> > > --- a/migration/ram.c
> > > +++ b/migration/ram.c
> > > @@ -2836,18 +2836,31 @@ static void
> > > migration_bitmap_clear_discarded_pages(RAMState *rs)
> > > static void ram_init_bitmaps(RAMState *rs)
> > > {
> > > + Error *local_err = NULL;
> > > + bool ret = true;
> > > +
> > > qemu_mutex_lock_ramlist();
> > > WITH_RCU_READ_LOCK_GUARD() {
> > > ram_list_init_bitmaps();
>
> btw, should we use bitmap_try_new() to create the bitmaps instead of
> bitmap_new() which can abort() ?
I'm not sure how much it'll help in reality; if allocation can fail here I
would expect qemu crash sooner or later.. but I agree the try_new() seems
reasonable too to be used here if this can fail now, after all migration is
extra feature on top of VM's emulation functions, so it's optional.
Thanks,
--
Peter Xu
[PATCH v4 15/25] migration: Modify ram_init_bitmaps() to report dirty tracking errors, Cédric Le Goater, 2024/03/06
[PATCH v4 16/25] vfio: Add Error** argument to .set_dirty_page_tracking() handler, Cédric Le Goater, 2024/03/06
[PATCH v4 18/25] vfio: Add Error** argument to vfio_devices_dma_logging_stop(), Cédric Le Goater, 2024/03/06