Re: [Update PATCH 2/2] aio, mem-hotplug: Add memory barrier to aio ring page migration.

2014-03-04 Thread Yasuaki Ishimatsu
(2014/03/04 14:35), Miao Xie wrote: > Onthu, 27 Feb 2014 21:44:23 +0900, Yasuaki Ishimatsu wrote: >> When doing aio ring page migration, we migrated the page, and update >> ctx->ring_pages[]. Like the following: >> >> aio_migratepage() >> |-> migrate_page_copy(new, old) >> | ..

Re: [Update PATCH 2/2] aio, mem-hotplug: Add memory barrier to aio ring page migration.

2014-03-04 Thread KOSAKI Motohiro
>> + /* >> + * Ensure that the page's data was copied from old one by >> + * aio_migratepage(). >> + */ >> + smp_rmb(); >> + > > smp_read_barrier_depends() is better. > > "One could place an A smp_rmb() primitive between the pointer

Re: [Update PATCH 2/2] aio, mem-hotplug: Add memory barrier to aio ring page migration.

2014-03-04 Thread KOSAKI Motohiro
+ /* + * Ensure that the page's data was copied from old one by + * aio_migratepage(). + */ + smp_rmb(); + smp_read_barrier_depends() is better. One could place an A smp_rmb() primitive between the pointer fetch and

Re: [Update PATCH 2/2] aio, mem-hotplug: Add memory barrier to aio ring page migration.

2014-03-04 Thread Yasuaki Ishimatsu
(2014/03/04 14:35), Miao Xie wrote: Onthu, 27 Feb 2014 21:44:23 +0900, Yasuaki Ishimatsu wrote: When doing aio ring page migration, we migrated the page, and update ctx-ring_pages[]. Like the following: aio_migratepage() |- migrate_page_copy(new, old) | ..

Re: [Update PATCH 2/2] aio, mem-hotplug: Add memory barrier to aio ring page migration.

2014-03-03 Thread Miao Xie
On thu, 27 Feb 2014 21:44:23 +0900, Yasuaki Ishimatsu wrote: > When doing aio ring page migration, we migrated the page, and update > ctx->ring_pages[]. Like the following: > > aio_migratepage() > |-> migrate_page_copy(new, old) > | .. /* Need barrier here

Re: [Update PATCH 2/2] aio, mem-hotplug: Add memory barrier to aio ring page migration.

2014-03-03 Thread Miao Xie
On thu, 27 Feb 2014 21:44:23 +0900, Yasuaki Ishimatsu wrote: When doing aio ring page migration, we migrated the page, and update ctx-ring_pages[]. Like the following: aio_migratepage() |- migrate_page_copy(new, old) | .. /* Need barrier here */ |-

[Update PATCH 2/2] aio, mem-hotplug: Add memory barrier to aio ring page migration.

2014-02-27 Thread Yasuaki Ishimatsu
When doing aio ring page migration, we migrated the page, and update ctx->ring_pages[]. Like the following: aio_migratepage() |-> migrate_page_copy(new, old) | .. /* Need barrier here */ |-> ctx->ring_pages[idx] = new Actually, we need a memory barrier

[Update PATCH 2/2] aio, mem-hotplug: Add memory barrier to aio ring page migration.

2014-02-27 Thread Yasuaki Ishimatsu
When doing aio ring page migration, we migrated the page, and update ctx-ring_pages[]. Like the following: aio_migratepage() |- migrate_page_copy(new, old) | .. /* Need barrier here */ |- ctx-ring_pages[idx] = new Actually, we need a memory barrier between