Whamcloud - gitweb
LU-11616 llite: replace smp_wb() with full memory barrier 71/33571/2
authorNeilBrown <neilb@suse.com>
Sun, 4 Nov 2018 20:26:57 +0000 (15:26 -0500)
committerOleg Drokin <green@whamcloud.com>
Mon, 11 Feb 2019 03:22:55 +0000 (03:22 +0000)
commitbdb2683fffa89ce31f43f5f42eed50e6d6dbb94b
treece3e02c2c6f4bbe56f3006e4343bf806a3945bae
parent65a7a268251634acd81dbf14dc78f1b4f7cf5157
LU-11616 llite: replace smp_wb() with full memory barrier

While porting the smp_mb() patch from LU-9210 to the linux clients
Neil asked that the smp_wb() be replaced with the full memory
barrier functions smp_store_release() and smp_load_acquire(). For
this case _sa_make_ready() sets the entry->se_state and
revalidate_statahead_dentry() tests the value of entry->se_state
after waiting on sai_waitq. This change will make it obvious which
variable was important, and would show the paired synchronization
points. An additional benefit is that code will work on platforms
that are not "total store order" TSO architectures like PowerPC.

Change-Id: I687177bf1697a21db624a289c136215af4d90506
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/33571
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/statahead.c