[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v7 2/9] mm: Place unscrubbed pages at the end of pagelist



>>> On 15.08.17 at 17:03, <boris.ostrovsky@xxxxxxxxxx> wrote:
> I can switch x86 only back to "normal" types but then we also have this
> in patch 7:
> 
> static void check_and_stop_scrub(struct page_info *head)
> {
>     if ( head->u.free.scrub_state == BUDDY_SCRUBBING )
>     {
>         typeof(head->u.free) pgfree;
> 
>         head->u.free.scrub_state = BUDDY_SCRUB_ABORT;
>         spin_lock_kick();
>         for ( ; ; )
>         {
>             /* Can't ACCESS_ONCE() a bitfield. */
>             pgfree.val = ACCESS_ONCE(head->u.free.val);
>             if ( pgfree.scrub_state != BUDDY_SCRUB_ABORT )
>                 break;
>             cpu_relax();
>         }
>     }
> }
> 
> I'd rather avoid having '#ifdef <arch>' meaning that
> 
> union {
>             struct {
>                 unsigned int first_dirty;
>                 bool need_tlbflush;
>                 uint8_t scrub_state;
>             };
> 
>             unsigned long val;
> } free;
> 
> is still kept for x86.

That's fine I think.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.