Thread (27 messages) 27 messages, 4 authors, 2021-03-22

Re: [PATCH v4] mm: cma: support sysfs

From: Dmitry Osipenko <digetx@gmail.com>
Date: 2021-03-19 17:45:11
Also in: linux-mm, lkml

19.03.2021 20:41, Dmitry Osipenko пишет:
19.03.2021 20:29, Dmitry Osipenko пишет:
quoted
+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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help