1. 11 Jul, 2024 2 commits
  2. 05 Jul, 2024 5 commits
  3. 02 Jul, 2024 2 commits
  4. 25 Jun, 2024 2 commits
  5. 21 Jun, 2024 4 commits
  6. 19 Jun, 2024 1 commit
    • Lai Jiangshan's avatar
      workqueue: Avoid nr_active manipulation in grabbing inactive items · b56c7207
      Lai Jiangshan authored
      Current try_to_grab_pending() activates the inactive item and
      subsequently treats it as though it were a standard activated item.
      
      This approach prevents duplicating handling logic for both active and
      inactive items, yet the premature activation of an inactive item
      triggers trace_workqueue_activate_work(), yielding an unintended user
      space visible side effect.
      
      And the unnecessary increment of the nr_active, which is not a simple
      counter now, followed by a counteracted decrement, is inefficient and
      complicates the code.
      
      Just remove the nr_active manipulation code in grabbing inactive items.
      Signed-off-by: default avatarLai Jiangshan <jiangshan.ljs@antgroup.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      b56c7207
  7. 10 Jun, 2024 1 commit
    • Julia Lawall's avatar
      workqueue: replace call_rcu by kfree_rcu for simple kmem_cache_free callback · 37c2277f
      Julia Lawall authored
      Since SLOB was removed, it is not necessary to use call_rcu
      when the callback only performs kmem_cache_free. Use
      kfree_rcu() directly.
      
      The changes were done using the following Coccinelle semantic patch.
      This semantic patch is designed to ignore cases where the callback
      function is used in another way.
      
      // <smpl>
      @r@
      expression e;
      local idexpression e2;
      identifier cb,f;
      position p;
      @@
      
      (
      call_rcu(...,e2)
      |
      call_rcu(&e->f,cb@p)
      )
      
      @r1@
      type T;
      identifier x,r.cb;
      @@
      
       cb(...) {
      (
         kmem_cache_free(...);
      |
         T x = ...;
         kmem_cache_free(...,x);
      |
         T x;
         x = ...;
         kmem_cache_free(...,x);
      )
       }
      
      @s depends on r1@
      position p != r.p;
      identifier r.cb;
      @@
      
       cb@p
      
      @script:ocaml@
      cb << r.cb;
      p << s.p;
      @@
      
      Printf.eprintf "Other use of %s at %s:%d\n"
         cb (List.hd p).file (List.hd p).line
      
      @depends on r1 && !s@
      expression e;
      identifier r.cb,f;
      position r.p;
      @@
      
      - call_rcu(&e->f,cb@p)
      + kfree_rcu(e,f)
      
      @r1a depends on !s@
      type T;
      identifier x,r.cb;
      @@
      
      - cb(...) {
      (
      -  kmem_cache_free(...);
      |
      -  T x = ...;
      -  kmem_cache_free(...,x);
      |
      -  T x;
      -  x = ...;
      -  kmem_cache_free(...,x);
      )
      - }
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <Julia.Lawall@inria.fr>
      Reviewed-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      Reviewed-by: default avatarVlastimil Babka <vbabka@suse.cz>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      37c2277f
  8. 07 Jun, 2024 1 commit
  9. 06 Jun, 2024 22 commits