Re: [PATCH v6] hugetlb: Add hugetlb.*.numa_stat file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 10, 2021 at 6:36 PM Muchun Song <songmuchun@xxxxxxxxxxxxx> wrote:
>
[...]
> > +struct hugetlb_cgroup_per_node {
> > +       /* hugetlb usage in pages over all hstates. */
> > +       atomic_long_t usage[HUGE_MAX_HSTATE];
>
> Why do you use atomic? IIUC, 'usage' is always
> increased/decreased under hugetlb_lock except
> hugetlb_cgroup_read_numa_stat() which is always
> reading it. So I think WRITE_ONCE/READ_ONCE
> is enough.

Oh this is me misguiding Mina, sorry about that. Yes, READ_ONCE()
should be good enough in hugetlb_cgroup_read_numa_stat().




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux