Commit f8c67d8
bpf: Use kmalloc_nolock() in range tree
The range tree uses bpf_mem_alloc() that is safe to be called from all
contexts and uses a pre-allocated pool of memory to serve these
allocations.
Replace bpf_mem_alloc() with kmalloc_nolock() as it can be called safely
from all contexts and is more scalable than bpf_mem_alloc().
Remove the migrate_disable/enable pairs as they were only needed for
bpf_mem_alloc() as it does per-cpu operations, kmalloc_nolock() doesn't
need this.
Signed-off-by: Puranjay Mohan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>1 parent 6f1f4c1 commit f8c67d8
1 file changed
+6
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | | - | |
| 23 | + | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
150 | 149 | | |
151 | 150 | | |
152 | 151 | | |
153 | | - | |
154 | | - | |
155 | | - | |
| 152 | + | |
156 | 153 | | |
157 | 154 | | |
158 | 155 | | |
| |||
172 | 169 | | |
173 | 170 | | |
174 | 171 | | |
175 | | - | |
176 | | - | |
177 | | - | |
| 172 | + | |
178 | 173 | | |
179 | 174 | | |
180 | 175 | | |
| |||
227 | 222 | | |
228 | 223 | | |
229 | 224 | | |
230 | | - | |
231 | | - | |
232 | | - | |
| 225 | + | |
233 | 226 | | |
234 | 227 | | |
235 | 228 | | |
| |||
241 | 234 | | |
242 | 235 | | |
243 | 236 | | |
244 | | - | |
245 | | - | |
246 | | - | |
| 237 | + | |
247 | 238 | | |
248 | 239 | | |
249 | 240 | | |
| |||
259 | 250 | | |
260 | 251 | | |
261 | 252 | | |
262 | | - | |
| 253 | + | |
263 | 254 | | |
264 | 255 | | |
265 | 256 | | |
| |||
0 commit comments