[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180311112725.GC4043@hirez.programming.kicks-ass.net>
Date: Sun, 11 Mar 2018 12:27:26 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Dan Williams <dan.j.williams@...el.com>
Cc: linux-nvdimm@...ts.01.org, Ingo Molnar <mingo@...hat.com>,
Christoph Hellwig <hch@....de>, david@...morbit.com,
linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
jack@...e.cz, ross.zwisler@...ux.intel.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 08/11] wait_bit: introduce {wait_on,wake_up}_atomic_one
On Fri, Mar 09, 2018 at 10:55:32PM -0800, Dan Williams wrote:
> Add a generic facility for awaiting an atomic_t to reach a value of 1.
>
> Page reference counts typically need to reach 0 to be considered a
> free / inactive page. However, ZONE_DEVICE pages allocated via
> devm_memremap_pages() are never 'onlined', i.e. the put_page() typically
> done at init time to assign pages to the page allocator is skipped.
>
> These pages will have their reference count elevated > 1 by
> get_user_pages() when they are under DMA. In order to coordinate DMA to
> these pages vs filesytem operations like hole-punch and truncate the
> filesystem-dax implementation needs to capture the DMA-idle event i.e.
> the 2 to 1 count transition).
>
> For now, this implementation does not have functional behavior change,
> follow-on patches will add waiters for these page-idle events.
Argh, no no no.. That whole wait_for_atomic_t thing is a giant
trainwreck already and now you're making it worse still.
Please have a look here:
https://lkml.kernel.org/r/20171101190644.chwhfpoz3ywxx2m7@hirez.programming.kicks-ass.net
Powered by blists - more mailing lists