[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86: fix paging_log_dirty_op to work with paging guests
On Thu, Dec 13, 2018 at 07:52:16AM -0700, Jan Beulich wrote: > >>> On 13.12.18 at 15:14, <roger.pau@xxxxxxxxxx> wrote: > > On Thu, Dec 13, 2018 at 05:51:51AM -0700, Jan Beulich wrote: > >> >>> On 13.12.18 at 12:39, <roger.pau@xxxxxxxxxx> wrote: > >> > Well, Just keeping correct order between each domain locks should be > >> > enough? > >> > > >> > Ie: exactly the same that Xen currently does but on a per-domain > >> > basis. This is feasible, but each CPU would need to store the lock > >> > order of each possible domain: > >> > > >> > DECLARE_PER_CPU(uint8_t, mm_lock_level[DOMID_FIRST_RESERVED]); > >> > > >> > This would consume ~32KB per CPU, which is not that much but seems a > >> > waste when most of the time a single entry will be used. > >> > >> Well, tracking by domain ID wouldn't help you - the controlling > >> domain may well have a higher ID than the being controlled one, > >> i.e. the nesting you want needs to be independent of domain ID. > > > > It's not tracking the domain ID, but rather tracking the lock level of > > each different domain, hence the need for the array in the pcpu > > structure. The lock checker would take a domain id and a level, and > > perform the check as: > > > > if ( mm_lock_level[domid] > level ) > > panic > > But this would open things up for deadlocks because of intermixed > lock usage between the calling domain's and the subject one's. > There needs to be a linear sequence of locks (of all involved > domains) describing the one and only order in which they may be > acquired. Well, my plan was to only check for deadlocks between the locks of the same domain, without taking into account intermixed domain locking. I guess at this point I will need some input from Tim and George about how to proceed, because I'm not sure how to weight locks when using intermixed domain locks, neither what is the correct order. The order in paging_log_dirty_op looks like a valid order that we want to support, but are there any others? Is it possible to have multiple valid interdomain lock orders that cannot be expressed using the current weighted lock ordering? Thanks, Roger. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |