Re: [PATCH v2 13/19] mm/migrate: Use xchg instead of spinlock

From: Srikar Dronamraju
Date: Mon Jul 23 2018 - 07:20:45 EST


> If you maybe write that like:
>
> if (time_after(jiffies, next_window) &&
> xchg(&pgdat->numabalancing_migrate_nr_pages, 0UL)) {
>
> do {
> next_window += interval;
> } while (unlikely(time_after(jiffies, next_window)));
>
> WRITE_ONCE(pgdat->numabalancing_migrate_next_window, next_window);
> }
>
> Then you avoid an indent level and line-wrap, resulting imo easier to
> read code.
>

Okay will do.