[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f2187cd5-505b-5274-c2a8-706a9c26aa2d@gmail.com>
Date: Fri, 19 Mar 2021 20:44:09 +0300
From: Dmitry Osipenko <digetx@...il.com>
To: Minchan Kim <minchan@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-mm <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>, joaodias@...gle.com,
willy@...radead.org, david@...hat.com, surenb@...gle.com,
John Hubbard <jhubbard@...dia.com>,
Nicolas Chauvet <kwizart@...il.com>,
"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>
Subject: Re: [PATCH v4] mm: cma: support sysfs
19.03.2021 20:41, Dmitry Osipenko пишет:
> 19.03.2021 20:29, Dmitry Osipenko пишет:
>> +void cma_sysfs_alloc_pages_count(struct cma *cma, size_t count)
>> +{
>> + atomic64_add(count, &cma->nr_pages_succeeded);
>> +}
>> +
>> +void cma_sysfs_fail_pages_count(struct cma *cma, size_t count)
>> +{
>> + atomic64_add(count, &cma->nr_pages_failed);
>> +}
>
> The atomic looks good, but aren't CMA allocations already protected by
> the CMA core? Do we really need to worry about racing here?
>
Although, please scratch that. I see now that these functions are called
outside of the lock.
Powered by blists - more mailing lists