• SeongJae Park's avatar
    mm/damon/sysfs-schemes: commit damos quota goals user input to DAMOS · 8b549a4f
    SeongJae Park authored
    Make DAMON sysfs interface to read the user inputs for DAMOS quota goals
    and pass those to DAMOS, so that the users can use the quota auto-tuning
    feature.  It uses the DAMON sysfs interface's user input commit mechanism,
    which applies all user inputs for initial starting of DAMON and online
    input updates, which can be done by writing 'on' and 'commit' to the
    kdamond's 'state' file, respectively.  In other words, the user should
    periodically write appropriate value to 'current_value' files and 'commit'
    command to the 'state' file.  'target_value' files could also be similarly
    updated at any time.
    
    Note that the interface is supporting multiple goals while the core logic
    supports only one goal.  DAMON sysfs interface passes only best feedback
    among the given inputs, to avoid making DAMOS too aggressive.
    
    Link: https://lkml.kernel.org/r/20231130023652.50284-4-sj@kernel.orgSigned-off-by: default avatarSeongJae Park <sj@kernel.org>
    Cc: Brendan Higgins <brendanhiggins@google.com>
    Cc: David Gow <davidgow@google.com>
    Cc: Jonathan Corbet <corbet@lwn.net>
    Cc: Shuah Khan <shuah@kernel.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    8b549a4f
sysfs-schemes.c 59.3 KB