[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH] mm: convert totalram_pages, totalhigh_pages and managed_pages to atomic.
- To: Arun KS <arunks@xxxxxxxxxxxxxx>, Guo Ren <ren_guo@xxxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Martin Schwidefsky <schwidefsky@xxxxxxxxxx>, Heiko Carstens <heiko.carstens@xxxxxxxxxx>, Jeff Dike <jdike@xxxxxxxxxxx>, Richard Weinberger <richard@xxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, x86@xxxxxxxxxx, David Airlie <airlied@xxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Oded Gabbay <oded.gabbay@xxxxxxxxx>, Alex Deucher <alexander.deucher@xxxxxxx>, Christian König <christian.koenig@xxxxxxx>, "David (ChunMing) Zhou" <David1.Zhou@xxxxxxx>, Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx>, Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>, Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>, "K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>, Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>, Stephen Hemminger <sthemmin@xxxxxxxxxxxxx>, Alasdair Kergon <agk@xxxxxxxxxx>, Mike Snitzer <snitzer@xxxxxxxxxx>, dm-devel@xxxxxxxxxx, Tiffany Lin <tiffany.lin@xxxxxxxxxxxx>, Andrew-CT Chen <andrew-ct.chen@xxxxxxxxxxxx>, Minghsiu Tsai <minghsiu.tsai@xxxxxxxxxxxx>, Houlong Wei <houlong.wei@xxxxxxxxxxxx>, Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>, Matthias Brugger <matthias.bgg@xxxxxxxxx>, Xavier Deguillard <xdeguillard@xxxxxxxxxx>, Nadav Amit <namit@xxxxxxxxxx>, "VMware, Inc." <pv-drivers@xxxxxxxxxx>, "James E.J. Bottomley" <jejb@xxxxxxxxxxxxxxxx>, Helge Deller <deller@xxxxxx>, Laura Abbott <labbott@xxxxxxxxxx>, Sumit Semwal <sumit.semwal@xxxxxxxxxx>, Arve Hjønnevåg <arve@xxxxxxxxxxx>, Todd Kjos <tkjos@xxxxxxxxxxx>, Martijn Coenen <maco@xxxxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, "Yan, Zheng" <zyan@xxxxxxxxxx>, Sage Weil <sage@xxxxxxxxxx>, Ilya Dryomov <idryomov@xxxxxxxxx>, Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>, Miklos Szeredi <miklos@xxxxxxxxxx>, Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>, Anna Schumaker <anna.schumaker@xxxxxxxxxx>, "J. Bruce Fields" <bfields@xxxxxxxxxxxx>, Jeff Layton <jlayton@xxxxxxxxxx>, Anton Altaparmakov <anton@xxxxxxxxxx>, Alexey Dobriyan <adobriyan@xxxxxxxxx>, Eric Biederman <ebiederm@xxxxxxxxxxxx>, "Rafael J. Wysocki" <rjw@xxxxxxxxxxxxx>, Pavel Machek <pavel@xxxxxx>, Len Brown <len.brown@xxxxxxxxx>, Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx>, Alexander Potapenko <glider@xxxxxxxxxx>, Dmitry Vyukov <dvyukov@xxxxxxxxxx>, Hugh Dickins <hughd@xxxxxxxxxx>, Christoph Lameter <cl@xxxxxxxxx>, Pekka Enberg <penberg@xxxxxxxxxx>, David Rientjes <rientjes@xxxxxxxxxx>, Joonsoo Kim <iamjoonsoo.kim@xxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Seth Jennings <sjenning@xxxxxxxxxx>, Dan Streetman <ddstreet@xxxxxxxx>, Gerrit Renker <gerrit@xxxxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Eric Dumazet <edumazet@xxxxxxxxxx>, Alexey Kuznetsov <kuznet@xxxxxxxxxxxxx>, Hideaki YOSHIFUJI <yoshfuji@xxxxxxxxxxxxxx>, Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>, Jozsef Kadlecsik <kadlec@xxxxxxxxxxxxxxxxx>, Florian Westphal <fw@xxxxxxxxx>, Vlad Yasevich <vyasevich@xxxxxxxxx>, Neil Horman <nhorman@xxxxxxxxxxxxx>, Marcelo Ricardo Leitner <marcelo.leitner@xxxxxxxxx>, Mimi Zohar <zohar@xxxxxxxxxxxxxxxxxx>, Dmitry Kasatkin <dmitry.kasatkin@xxxxxxxxx>, James Morris <jmorris@xxxxxxxxx>, "Serge E. Hallyn" <serge@xxxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx>, Jessica Yu <jeyu@xxxxxxxxxx>, Kees Cook <keescook@xxxxxxxxxxxx>, Cyril Bur <cyrilbur@xxxxxxxxx>, Russell Currey <ruscur@xxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>, Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>, Matthew Auld <matthew.auld@xxxxxxxxx>, Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>, Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx>, Thomas Zimmermann <tzimmermann@xxxxxxx>, "Gustavo A. R. Silva" <gustavo@xxxxxxxxxxxxxx>, Philippe Ombredanne <pombredanne@xxxxxxxx>, Kate Stewart <kstewart@xxxxxxxxxxxxxxxxxxx>, Anthony Yznaga <anthony.yznaga@xxxxxxxxxx>, Khalid Aziz <khalid@xxxxxxxxxxxxxx>, Matthew Wilcox <willy@xxxxxxxxxxxxx>, Pavel Tatashin <pavel.tatashin@xxxxxxxxxxxxx>, "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>, Dan Williams <dan.j.williams@xxxxxxxxx>, Souptick Joarder <jrdr.linux@xxxxxxxxx>, Vlastimil Babka <vbabka@xxxxxxx>, Oscar Salvador <osalvador@xxxxxxx>, Johannes Weiner <hannes@xxxxxxxxxxx>, Roman Gushchin <guro@xxxxxx>, Petr Tesarik <ptesarik@xxxxxxxx>, Jia He <jia.he@xxxxxxxxxxxxxxxx>, Minchan Kim <minchan@xxxxxxxxxx>, Huang Ying <ying.huang@xxxxxxxxx>, Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>, Tejun Heo <tj@xxxxxxxxxx>, Jan Kara <jack@xxxxxxx>, Omar Sandoval <osandov@xxxxxx>, Marcos Paulo de Souza <marcos.souza.org@xxxxxxxxx>, Jérôme Glisse <jglisse@xxxxxxxxxx>, "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxxxxx>, Konstantin Khlebnikov <khlebnikov@xxxxxxxxxxxxxx>, Jonathan Corbet <corbet@xxxxxxx>, Stefan Agner <stefan@xxxxxxxx>, Daniel Vacek <neelx@xxxxxxxxxx>, Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>, David Hildenbrand <david@xxxxxxxxxx>, Mathieu Malaterre <malat@xxxxxxxxxx>, Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>, Yang Shi <yang.shi@xxxxxxxxxxxxxxxxx>, Alexander Duyck <alexander.h.duyck@xxxxxxxxxxxxxxx>, Randy Dunlap <rdunlap@xxxxxxxxxxxxx>, YueHaibing <yuehaibing@xxxxxxxxxx>, Shakeel Butt <shakeelb@xxxxxxxxxx>, Chintan Pandya <cpandya@xxxxxxxxxxxxxx>, "Luis R. Rodriguez" <mcgrof@xxxxxxxxxx>, Jann Horn <jannh@xxxxxxxxxx>, Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>, "Steven J. Hill" <steven.hill@xxxxxxxxxx>, Kemi Wang <kemi.wang@xxxxxxxxx>, Kirill Tkhai <ktkhai@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-um@xxxxxxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, amd-gfx@xxxxxxxxxxxxxxxxxxxxx, intel-gfx@xxxxxxxxxxxxxxxxxxxxx, devel@xxxxxxxxxxxxxxxxxxxxxx, linux-media@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-mediatek@xxxxxxxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, devel@xxxxxxxxxxxxxxxxxxxx, linaro-mm-sig@xxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, ceph-devel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-nfs@xxxxxxxxxxxxxxx, linux-ntfs-dev@xxxxxxxxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, kexec@xxxxxxxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx, kasan-dev@xxxxxxxxxxxxxxxx, dccp@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, linux-decnet-user@xxxxxxxxxxxxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxx, coreteam@xxxxxxxxxxxxx, linux-sctp@xxxxxxxxxxxxxxx, linux-integrity@xxxxxxxxxxxxxxx, linux-security-module@xxxxxxxxxxxxxxx
- From: Joe Perches <joe@xxxxxxxxxxx>
- Date: Mon, 22 Oct 2018 21:15:37 -0700
- Cc: getarunks@xxxxxxxxx
- Delivery-date: Tue, 23 Oct 2018 04:53:41 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Mon, 2018-10-22 at 22:53 +0530, Arun KS wrote:
> Remove managed_page_count_lock spinlock and instead use atomic
> variables.
Perhaps better to define and use macros for the accesses
instead of specific uses of atomic_long_<inc/dec/read>
Something like:
#define totalram_pages() (unsigned
long)atomic_long_read(&_totalram_pages)
#define totalram_pages_inc() (unsigned long)atomic_long_inc(&_totalram_pages)
#define totalram_pages_dec() (unsigned long)atomic_long_dec(&_totalram_pages)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|