Skip to content
Snippets Groups Projects
  1. Jan 24, 2024
  2. Jan 18, 2024
  3. Dec 20, 2023
  4. Dec 19, 2023
    • Steven Rostedt (Google)'s avatar
      tracing: Allow creating instances with specified system events · d2356997
      Steven Rostedt (Google) authored
      A trace instance may only need to enable specific events. As the eventfs
      directory of an instance currently creates all events which adds overhead,
      allow internal instances to be created with just the events in systems
      that they care about. This currently only deals with systems and not
      individual events, but this should bring down the overhead of creating
      instances for specific use cases quite bit.
      
      The trace_array_get_by_name() now has another parameter "systems". This
      parameter is a const string pointer of a comma/space separated list of
      event systems that should be created by the trace_array. (Note if the
      trace_array already exists, this parameter is ignored).
      
      The list of systems is saved and if a module is loaded, its events will
      not be added unless the system for those events also match the systems
      string.
      
      Link: https://lore.kernel.org/linux-trace-kernel/20231213093701.03fddec0@gandalf.local.home
      
      
      
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: Arun Easi   <aeasi@marvell.com>
      Cc: Daniel Wagner <dwagner@suse.de>
      Tested-by: default avatarDmytro Maluka <dmaluka@chromium.org>
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      d2356997
  5. Dec 13, 2023
  6. Dec 11, 2023
    • Dmitry Rokosov's avatar
      samples/cgroup: introduce memcg memory.events listener · becf6529
      Dmitry Rokosov authored
      This is a simple listener for memory events that handles counter changes
      in runtime.  It can be set up for a specific memory cgroup v2.
      
      The output example:
      =====
      $ /tmp/memcg_event_listener test
      Initialized MEMCG events with counters:
      MEMCG events:
      	low: 0
      	high: 0
      	max: 0
      	oom: 0
      	oom_kill: 0
      	oom_group_kill: 0
      Started monitoring memory events from '/sys/fs/cgroup/test/memory.events'...
      Received event in /sys/fs/cgroup/test/memory.events:
      *** 1 MEMCG oom_kill event, change counter 0 => 1
      Received event in /sys/fs/cgroup/test/memory.events:
      *** 1 MEMCG oom_kill event, change counter 1 => 2
      Received event in /sys/fs/cgroup/test/memory.events:
      *** 1 MEMCG oom_kill event, change counter 2 => 3
      Received event in /sys/fs/cgroup/test/memory.events:
      *** 1 MEMCG oom_kill event, change counter 3 => 4
      Received event in /sys/fs/cgroup/test/memory.events:
      *** 2 MEMCG max events, change counter 0 => 2
      Received event in /sys/fs/cgroup/test/memory.events:
      *** 8 MEMCG max events, change counter 2 => 10
      *** 1 MEMCG oom event, change counter 0 => 1
      Received event in /sys/fs/cgroup/test/memory.events:
      *** 1 MEMCG oom_kill event, change counter 4 => 5
      ^CExiting memcg event listener...
      =====
      
      Link: https://lkml.kernel.org/r/20231123071945.25811-3-ddrokosov@salutedevices.com
      
      
      Signed-off-by: default avatarDmitry Rokosov <ddrokosov@salutedevices.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Michal Hocko <mhocko@kernel.org>
      Cc: Muchun Song <muchun.song@linux.dev>
      Cc: Roman Gushchin <roman.gushchin@linux.dev>
      Cc: Shakeel Butt <shakeelb@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      becf6529
    • Dmitry Rokosov's avatar
      samples: introduce new samples subdir for cgroup · 60433a9d
      Dmitry Rokosov authored
      Patch series "samples: introduce cgroup events listeners", v3.
      
      To begin with, this patch series relocates the cgroup example code to the
      samples/cgroup directory, which is the appropriate location for such code
      snippets.
      
      Furthermore, a new memcg events listener is introduced.  This listener is
      a simple yet effective tool for monitoring memory events and managing
      counter changes during runtime.
      
      Additionally, as per Andrew Morton's suggestion, a helpful reminder
      comment is included in the memcontrol implementation.  This comment serves
      to ensure that the samples code is updated whenever new events are added.
      
      
      This patch (of 3):
      
      Move the cgroup_event_listener for cgroup v1 to the samples directory. 
      This suggestion was proposed by Andrew Morton during the discussion [1].
      
      Link: https://lore.kernel.org/all/20231106140934.3f5d4960141562fe8da53906@linux-foundation.org/ [1]
      Link: https://lkml.kernel.org/r/20231123071945.25811-1-ddrokosov@salutedevices.com
      Link: https://lkml.kernel.org/r/20231123071945.25811-2-ddrokosov@salutedevices.com
      
      
      Signed-off-by: default avatarDmitry Rokosov <ddrokosov@salutedevices.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Michal Hocko <mhocko@kernel.org>
      Cc: Muchun Song <muchun.song@linux.dev>
      Cc: Roman Gushchin <roman.gushchin@linux.dev>
      Cc: Shakeel Butt <shakeelb@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      60433a9d
  7. Nov 30, 2023
  8. Nov 28, 2023
  9. Nov 23, 2023
  10. Oct 26, 2023
  11. Oct 24, 2023
  12. Oct 23, 2023
  13. Oct 09, 2023
  14. Sep 28, 2023
  15. Sep 21, 2023
  16. Sep 08, 2023
  17. Aug 24, 2023
  18. Aug 22, 2023
  19. Aug 21, 2023
Loading