[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 4/6] memory: Add sanity check in address_space_to_flatview
From: |
Peter Xu |
Subject: |
Re: [PATCH v7 4/6] memory: Add sanity check in address_space_to_flatview |
Date: |
Fri, 10 Mar 2023 09:56:52 -0500 |
On Fri, Mar 10, 2023 at 10:24:23AM +0800, Chuang Xu wrote:
> Before using any flatview, sanity check whether BQL or rcu is held. And
> if we're during a memory region transaction, try to immediately update
> mappings, or the map can be invalid.
Sorry I didn't read into details in the previous version. This subject and
commit message all need update. It's not only about sanity anymore.
We need to state the major change to address_space_to_flatview() to allow
triggering do_commit() during a very large memory transaction, also on why
you did it.
IMHO it's because we find it's beneficial for speeding up vm load if wrap
the vm load into a whole memory transaction. The whole point is vm load
contains far more memory updates than referencing to a specific address
space / flatview, hence this nested do_commit should logically only be
triggered in a few spots during vm load.
Thanks,
--
Peter Xu
- [PATCH v7 0/6] migration: reduce time of loading non-iterable vmstate, Chuang Xu, 2023/03/09
- [PATCH v7 1/6] memory: Reference as->current_map directly in memory commit, Chuang Xu, 2023/03/09
- [PATCH v7 2/6] rcu: Introduce rcu_read_is_locked(), Chuang Xu, 2023/03/09
- [PATCH v7 3/6] memory: Introduce memory_region_transaction_do_commit(), Chuang Xu, 2023/03/09
- [PATCH v7 4/6] memory: Add sanity check in address_space_to_flatview, Chuang Xu, 2023/03/09
- Re: [PATCH v7 4/6] memory: Add sanity check in address_space_to_flatview,
Peter Xu <=
- [PATCH v7 5/6] migration: Reduce time of loading non-iterable vmstate, Chuang Xu, 2023/03/09
- [PATCH v7 6/6] memory: Introduce address_space_to_flatview_rcu(), Chuang Xu, 2023/03/09