Hi Hillf,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on linus/master]
[cannot apply to v5.4-rc2 next-20191011]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see
https://stackoverflow.com/a/37406982]
url:
https://github.com/0day-ci/linux/commits/Hillf-Danton/writeback-add-elast...
config: i386-tinyconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
mm/page-writeback.c: In function 'balance_dirty_pages_ratelimited':
> mm/page-writeback.c:1954:4: error: implicit declaration of
function 'cgwb_bdp' [-Werror=implicit-function-declaration]
cgwb_bdp(wb);
^~~~~~~~
> mm/page-writeback.c:1951:5: warning: suggest explicit braces to
avoid ambiguous 'else' [-Wdangling-else]
if
(unlikely(current->nr_dirtied >= ratelimit))
^
cc1: some warnings being treated as errors
--
In file included from mm/backing-dev.c:3:0:
mm/backing-dev.c: In function 'wb_init':
> mm/backing-dev.c:329:26: error: 'struct bdi_writeback'
has no member named 'bdp_waitq'
init_waitqueue_head(&wb->bdp_waitq);
^
include/linux/wait.h:67:26: note: in definition of macro 'init_waitqueue_head'
__init_waitqueue_head((wq_head), #wq_head, &__key); \
^~~~~~~
vim +/cgwb_bdp +1954 mm/page-writeback.c
1889
1890 /**
1891 * balance_dirty_pages_ratelimited - balance dirty memory state
1892 * @mapping: address_space which was dirtied
1893 *
1894 * Processes which are dirtying memory should call in here once for each page
1895 * which was newly dirtied. The function will periodically check the system's
1896 * dirty state and will initiate writeback if needed.
1897 *
1898 * On really big machines, get_writeback_state is expensive, so try to avoid
1899 * calling it too often (ratelimiting). But once we're over the dirty memory
1900 * limit we decrease the ratelimiting by a lot, to prevent individual processes
1901 * from overshooting the limit by (ratelimit_pages) each.
1902 */
1903 void balance_dirty_pages_ratelimited(struct address_space *mapping)
1904 {
1905 struct inode *inode = mapping->host;
1906 struct backing_dev_info *bdi = inode_to_bdi(inode);
1907 struct bdi_writeback *wb = NULL;
1908 int ratelimit;
1909 int *p;
1910
1911 if (!bdi_cap_account_dirty(bdi))
1912 return;
1913
1914 if (inode_cgwb_enabled(inode))
1915 wb = wb_get_create_current(bdi, GFP_KERNEL);
1916 if (!wb)
1917 wb = &bdi->wb;
1918
1919 ratelimit = current->nr_dirtied_pause;
1920 if (wb->dirty_exceeded)
1921 ratelimit = min(ratelimit, 32 >> (PAGE_SHIFT - 10));
1922
1923 preempt_disable();
1924 /*
1925 * This prevents one CPU to accumulate too many dirtied pages without
1926 * calling into balance_dirty_pages(), which can happen when there are
1927 * 1000+ tasks, all of them start dirtying pages at exactly the same
1928 * time, hence all honoured too large initial task->nr_dirtied_pause.
1929 */
1930 p = this_cpu_ptr(&bdp_ratelimits);
1931 if (unlikely(current->nr_dirtied >= ratelimit))
1932 *p = 0;
1933 else if (unlikely(*p >= ratelimit_pages)) {
1934 *p = 0;
1935 ratelimit = 0;
1936 }
1937 /*
1938 * Pick up the dirtied pages by the exited tasks. This avoids lots of
1939 * short-lived tasks (eg. gcc invocations in a kernel build) escaping
1940 * the dirty throttling and livelock other long-run dirtiers.
1941 */
1942 p = this_cpu_ptr(&dirty_throttle_leaks);
1943 if (*p > 0 && current->nr_dirtied < ratelimit) {
1944 unsigned long nr_pages_dirtied;
1945 nr_pages_dirtied = min(*p, ratelimit - current->nr_dirtied);
1946 *p -= nr_pages_dirtied;
1947 current->nr_dirtied += nr_pages_dirtied;
1948 }
1949 preempt_enable();
1950
1951 if (unlikely(current->nr_dirtied >= ratelimit))
1952 if (IS_ENABLED(CONFIG_CGROUP_WRITEBACK) &&
1953 IS_ENABLED(CONFIG_CGWB_BDP_WITH_EBDI))
1954 cgwb_bdp(wb);
1955 else
1956 balance_dirty_pages(wb, current->nr_dirtied);
1957
1958 wb_put(wb);
1959 }
1960 EXPORT_SYMBOL(balance_dirty_pages_ratelimited);
1961
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation