1. 02 Oct, 2021 38 commits
  2. 01 Oct, 2021 2 commits
    • Sebastian Andrzej Siewior's avatar
      net/core: disable NET_RX_BUSY_POLL on PREEMPT_RT · 20ab39d1
      Sebastian Andrzej Siewior authored
      napi_busy_loop() disables preemption and performs a NAPI poll. We can't acquire
      sleeping locks with disabled preemption which would be required while
      __napi_poll() invokes the callback of the driver.
      
      A threaded interrupt performing the NAPI-poll can be preempted on PREEMPT_RT.
      A RT thread on another CPU may observe NAPIF_STATE_SCHED bit set and busy-spin
      until it is cleared or its spin time runs out. Given it is the task with the
      highest priority it will never observe the NEED_RESCHED bit set.
      In this case the time is better spent by simply sleeping.
      
      The NET_RX_BUSY_POLL is disabled by default (the system wide sysctls for
      poll/read are set to zero). Disabling NET_RX_BUSY_POLL on PREEMPT_RT to avoid
      wrong locking context in case it is used.
      Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Link: https://lore.kernel.org/r/20211001145841.2308454-1-bigeasy@linutronix.deSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      20ab39d1
    • Andrii Nakryiko's avatar
      Merge branch 'libbpf: Support uniform BTF-defined key/value specification across all BPF maps' · d636c8da
      Andrii Nakryiko authored
      Hengqi Chen says:
      
      ====================
      
      Currently a bunch of (usually pretty specialized) BPF maps do not support
      specifying BTF types for they key and value. For such maps, specifying
      their definition like this:
      
        struct {
            __uint(type, BPF_MAP_TYPE_PERF_EVENT_ARRAY);
            __type(key, int);
            __type(value, int);
        } my_perf_buf SEC(".maps");
      
      Would actually produce warnings about retrying BPF map creation without BTF.
      Users are forced to know such nuances and use __uint(key_size, 4) instead.
      This is non-uniform, annoying, and inconvenient.
      
      This patch set teaches libbpf to recognize those specialized maps and removes
      BTF type IDs when creating BPF map. Also, update existing BPF selftests to
      exericse this change.
      ====================
      Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      d636c8da