Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1485500
| From | Omar Sandoval <osandov@osandov.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v4 2/6] sbitmap: allocate wait queues on a specific node |
| Date | 2016-09-17 10:30 +0200 |
| Message-ID | <sijay-b3-11@gated-at.bofh.it> (permalink) |
| References | <sijax-b3-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Omar Sandoval <osandov@fb.com>
The original bt_alloc() we converted from was using kzalloc(), not
kzalloc_node(), to allocate the wait queues. This was probably an
oversight, so fix it for sbitmap_queue_init_node().
Signed-off-by: Omar Sandoval <osandov@fb.com>
---
lib/sbitmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/sbitmap.c b/lib/sbitmap.c
index dfc084a..4d8e97e 100644
--- a/lib/sbitmap.c
+++ b/lib/sbitmap.c
@@ -208,7 +208,7 @@ int sbitmap_queue_init_node(struct sbitmap_queue *sbq, unsigned int depth,
sbq->wake_batch = sbq_calc_wake_batch(depth);
atomic_set(&sbq->wake_index, 0);
- sbq->ws = kzalloc(SBQ_WAIT_QUEUES * sizeof(*sbq->ws), flags);
+ sbq->ws = kzalloc_node(SBQ_WAIT_QUEUES * sizeof(*sbq->ws), flags, node);
if (!sbq->ws) {
sbitmap_free(&sbq->sb);
return -ENOMEM;
--
2.9.3
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4 0/6] blk-mq: generalization and bug fixes for tag allocation Omar Sandoval <osandov@osandov.com> - 2016-09-17 10:30 +0200 [PATCH v4 2/6] sbitmap: allocate wait queues on a specific node Omar Sandoval <osandov@osandov.com> - 2016-09-17 10:30 +0200 [PATCH v4 4/6] sbitmap: push alloc policy into sbitmap_queue Omar Sandoval <osandov@osandov.com> - 2016-09-17 10:30 +0200 [PATCH v4 6/6] sbitmap: re-initialize allocation hints after resize Omar Sandoval <osandov@osandov.com> - 2016-09-17 10:30 +0200 [PATCH v4 3/6] sbitmap: push per-cpu last_tag into sbitmap_queue Omar Sandoval <osandov@osandov.com> - 2016-09-17 10:40 +0200
csiph-web