[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 6/8] mm: Keep heap accessible to others while scrubbing
>>> Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> 07/23/17 4:28 AM >>> >On 06/27/2017 03:28 PM, Jan Beulich wrote: >>>>> Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> 06/22/17 8:56 PM >>> >>> +static void check_and_stop_scrub(struct page_info *head) >>> +{ >>> + if ( head->u.free.scrub_state == BUDDY_SCRUBBING ) >>> + { >>> + struct page_info pg; >>> + >>> + head->u.free.scrub_state = BUDDY_SCRUB_ABORT; >>> + spin_lock_kick(); >>> + for ( ; ; ) >>> + { >>> + /* Can't ACCESS_ONCE() a bitfield. */ >>> + pg.u.free.val = ACCESS_ONCE(head->u.free.val); >> >> Something like ACCESS_ONCE(head->u.free).val ought to work (or read_atomic(), >> due to the questionable scalar type check in ACCESS_ONCE()). > >Hmm... I couldn't get this to work with either suggestion. > >page_alloc.c:751:13: error: conversion to non-scalar type requested >pg.u.free = read_atomic(&head->u.free); > >page_alloc.c:753:6: error: conversion to non-scalar type requested >if ( ACCESS_ONCE(head->u.free).scrub_state != BUDDY_SCRUB_ABORT ) Oh, indeed. That's rather unfortunate. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |