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