History

kernel: cgroup: add poll file operation

Cgroup has a standardized poll/notification mechanism for waking all pollers on all fds when a filesystem node changes. To allow polling for custom events, add a .poll callback that can override the default. This is in preparation for pollable cgroup pressure files which have per-fd trigger configurations.

Johannes Weiner committed 7 years ago

Commit dc505371 parent 147e1a92 files · +16 −0Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/cgroup-defs.h+4−0
@@ -32,6 +32,7 @@ struct kernfs_node; · 31 unmodified lines
32struct kernfs_ops;32struct kernfs_ops;
33struct kernfs_open_file;33struct kernfs_open_file;
34struct seq_file;34struct seq_file;
35struct poll_table_struct;
35 36
36#define MAX_CGROUP_TYPE_NAMELEN 3237#define MAX_CGROUP_TYPE_NAMELEN 32
37#define MAX_CGROUP_ROOT_NAMELEN 6438#define MAX_CGROUP_ROOT_NAMELEN 64
@@ -574,6 +575,9 @@ struct cftype { · 536 unmodified lines
574 ssize_t (*write)(struct kernfs_open_file *of,575 ssize_t (*write)(struct kernfs_open_file *of,
575 char *buf, size_t nbytes, loff_t off);576 char *buf, size_t nbytes, loff_t off);
576 577
578 __poll_t (*poll)(struct kernfs_open_file *of,
579 struct poll_table_struct *pt);
580
577#ifdef CONFIG_DEBUG_LOCK_ALLOC581#ifdef CONFIG_DEBUG_LOCK_ALLOC
578 struct lock_class_key lockdep_key;582 struct lock_class_key lockdep_key;
579#endif583#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t