diff options
| author | Arun KS <[email protected]> | 2018-12-28 08:34:24 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2018-12-28 20:11:47 +0000 |
| commit | 9705bea5f833f4fc21d5bef5fce7348427f76ea4 (patch) | |
| tree | 37604aa5b680736eb176283f970e1c1d7d27bbf3 /fs/file_table.c | |
| parent | mm: reference totalram_pages and managed_pages once per function (diff) | |
| download | kernel-9705bea5f833f4fc21d5bef5fce7348427f76ea4.tar.gz kernel-9705bea5f833f4fc21d5bef5fce7348427f76ea4.zip | |
mm: convert zone->managed_pages to atomic variable
totalram_pages, zone->managed_pages and totalhigh_pages updates are
protected by managed_page_count_lock, but readers never care about it.
Convert these variables to atomic to avoid readers potentially seeing a
store tear.
This patch converts zone->managed_pages. Subsequent patches will convert
totalram_panges, totalhigh_pages and eventually managed_page_count_lock
will be removed.
Main motivation was that managed_page_count_lock handling was complicating
things. It was discussed in length here,
https://lore.kernel.org/patchwork/patch/995739/#1181785 So it seemes
better to remove the lock and convert variables to atomic, with preventing
poteintial store-to-read tearing as a bonus.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arun KS <[email protected]>
Suggested-by: Michal Hocko <[email protected]>
Suggested-by: Vlastimil Babka <[email protected]>
Reviewed-by: Konstantin Khlebnikov <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Reviewed-by: Pavel Tatashin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/file_table.c')
0 files changed, 0 insertions, 0 deletions
