commit | 02516d3ff949271de661666353aa87ee06d74cce | [log] [tgz] |
---|---|---|
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | Mon Nov 19 15:29:26 2018 -0500 |
committer | Adriana Kobylak <anoo@us.ibm.com> | Mon Dec 03 16:09:02 2018 -0600 |
tree | 9d4d720ffd28be5c04ff23c7682aa1dbbac6f6f0 | |
parent | 3a19e62a59f317e5fae70054f6d8dafe985d8105 [diff] |
sync/watch: reduce memory usage Currently we get a different inotify handle for every file in the synclist, and register all of them with sd_event. A single fd will work and saves memory in libsystemd and the kernel, so do that instead. This in turn allows the fileMap structure to be simplified down to a basic map of watch descriptor / filename pairs. Remove redundant calls to both close and inotify_rm_watch - let the kernel do the work for us. From the inotify man page: When all file descriptors referring to an inotify instance have been closed (using close(2)), the underlying object and its resources are freed for reuse by the kernel; all associated watches are auto‐ matically freed. Change-Id: Ia63cb667cdf41c171276a0351d95347a54578f2f Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Phosphor BMC Code Management provides a set of system software management applications. More information can be found at Software Architecture
To build this package, do the following steps: 1. ./bootstrap.sh 2. ./configure ${CONFIGURE_FLAGS} 3. make To clean the repository run `./bootstrap.sh clean`.