On 04/05/2018 04:13 PM, Emilio G. Cota wrote: > +static __thread bool page_collection_locked; > + > +void assert_page_collection_locked(bool val) > +{ > + tcg_debug_assert(page_collection_locked == val); > +} > + > +static inline void set_page_collection_locked(bool val) > +{ > + page_collection_locked = val; > +} > +
This seems fairly fragile to me. (1) Do you ever do assert_page_collection_locked(true)? You don't appear to do so, and it's somewhat confusing. (2) Why does do_page_entry_lock set "locked" and not page_collection_lock? r~