Re: [RESEND v2 PATCH 1/2] aio, memory-hotplug: Fix confliction when migrating and accessing ring pages.

2014-03-16 Thread Tang Chen
On 03/14/2014 11:14 PM, Benjamin LaHaise wrote: .. What about the following patch? It adds additional reference to protect the page avoid being freed when we reading it. ps.It is applied on linux-next(3-13). I think that's even worse than the spinlock approach since we'll end up bouncing ar

Re: [RESEND v2 PATCH 1/2] aio, memory-hotplug: Fix confliction when migrating and accessing ring pages.

2014-03-15 Thread Gu Zheng
Hi Ben, Sorry for late. On 03/14/2014 11:14 PM, Benjamin LaHaise wrote: > Hi Gu, > > On Fri, Mar 14, 2014 at 06:25:16PM +0800, Gu Zheng wrote: >> Hi Ben, >> On 03/13/2014 06:17 AM, Benjamin LaHaise wrote: >> >>> Hello Tang, >>> >>> On Wed, Mar 12, 2014 at 01:25:26PM +0800, Tang Chen wrote: >>> ..

Re: [RESEND v2 PATCH 1/2] aio, memory-hotplug: Fix confliction when migrating and accessing ring pages.

2014-03-14 Thread Benjamin LaHaise
Hi Gu, On Fri, Mar 14, 2014 at 06:25:16PM +0800, Gu Zheng wrote: > Hi Ben, > On 03/13/2014 06:17 AM, Benjamin LaHaise wrote: > > > Hello Tang, > > > > On Wed, Mar 12, 2014 at 01:25:26PM +0800, Tang Chen wrote: > > ... ... > > > >>> Another spot is in > >>> aio_read_events_ring() where head and

Re: [RESEND v2 PATCH 1/2] aio, memory-hotplug: Fix confliction when migrating and accessing ring pages.

2014-03-14 Thread Gu Zheng
Hi Ben, On 03/13/2014 06:17 AM, Benjamin LaHaise wrote: > Hello Tang, > > On Wed, Mar 12, 2014 at 01:25:26PM +0800, Tang Chen wrote: > ... ... > >>> Another spot is in >>> aio_read_events_ring() where head and tail are fetched from the ring >>> without >>> any locking. I also fear we'll be in

Re: [RESEND v2 PATCH 1/2] aio, memory-hotplug: Fix confliction when migrating and accessing ring pages.

2014-03-12 Thread Benjamin LaHaise
Hello Tang, On Wed, Mar 12, 2014 at 01:25:26PM +0800, Tang Chen wrote: ... ... > >Another spot is in > >aio_read_events_ring() where head and tail are fetched from the ring > >without > >any locking. I also fear we'll be introducing new performance issues with > >all the additonal spinlock bou

Re: [RESEND v2 PATCH 1/2] aio, memory-hotplug: Fix confliction when migrating and accessing ring pages.

2014-03-11 Thread Tang Chen
Hi Ben, Sorry for the delay. On 03/12/2014 02:46 AM, Benjamin LaHaise wrote: On Mon, Mar 10, 2014 at 04:15:33PM +0800, Tang Chen wrote: IO ring page migration has been implemented by the following patch: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/fs/aio.

Re: [RESEND v2 PATCH 1/2] aio, memory-hotplug: Fix confliction when migrating and accessing ring pages.

2014-03-11 Thread Benjamin LaHaise
On Mon, Mar 10, 2014 at 04:15:33PM +0800, Tang Chen wrote: > IO ring page migration has been implemented by the following patch: > > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/fs/aio.c?id=36bc08cc01709b4a9bb563b35aa530241ddc63e3 > > In this patch, ctx->compl

[RESEND v2 PATCH 1/2] aio, memory-hotplug: Fix confliction when migrating and accessing ring pages.

2014-03-10 Thread Tang Chen
IO ring page migration has been implemented by the following patch: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/fs/aio.c?id=36bc08cc01709b4a9bb563b35aa530241ddc63e3 In this patch, ctx->completion_lock is used to prevent other processes from accessing the ring p

[V2 PATCH 1/2] aio, memory-hotplug: Fix confliction when migrating and, accessing ring pages

2014-03-09 Thread Tang Chen
AIO ring page migration has been implemented by the following patch: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/fs/aio.c?id=36bc08cc01709b4a9bb563b35aa530241ddc63e3 In this patch, ctx->completion_lock is used to prevent other processes from accessing the ring page be