Repository navigation
Commit 0536b85
xdp: Simplify devmap cleanup
After the RCU flavor consolidation [1], call_rcu() and
synchronize_rcu() waits for preempt-disable regions (NAPI) in addition
to the read-side critical sections. As a result of this, the cleanup
code in devmap can be simplified
* There is no longer a need to flush in __dev_map_entry_free, since we
know that this has been done when the call_rcu() callback is
triggered.
* When freeing the map, there is no need to explicitly wait for a
flush. It's guaranteed to be done after the synchronize_rcu() call
in dev_map_free(). The rcu_barrier() is still needed, so that the
map is not freed prior the elements.
[1] https://lwn.net/Articles/777036/
Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/bpf/20191219061006.21980-2-bjorn.topel@gmail.com1 parent 5bf2fc1 commit 0536b85
1 file changed
Lines changed: 5 additions & 38 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
| 204 | + | |
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | 224 | | |
237 | 225 | | |
238 | 226 | | |
| |||
345 | 333 | | |
346 | 334 | | |
347 | 335 | | |
348 | | - | |
349 | | - | |
| 336 | + | |
350 | 337 | | |
351 | 338 | | |
352 | 339 | | |
| |||
384 | 371 | | |
385 | 372 | | |
386 | 373 | | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
| 374 | + | |
392 | 375 | | |
393 | 376 | | |
394 | 377 | | |
| |||
409 | 392 | | |
410 | 393 | | |
411 | 394 | | |
412 | | - | |
| 395 | + | |
413 | 396 | | |
414 | 397 | | |
415 | 398 | | |
| |||
440 | 423 | | |
441 | 424 | | |
442 | 425 | | |
443 | | - | |
| 426 | + | |
444 | 427 | | |
445 | 428 | | |
446 | 429 | | |
| |||
509 | 492 | | |
510 | 493 | | |
511 | 494 | | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | 495 | | |
528 | 496 | | |
529 | 497 | | |
530 | 498 | | |
531 | 499 | | |
532 | | - | |
533 | 500 | | |
534 | 501 | | |
535 | 502 | | |
| |||
0 commit comments