tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git 
blk-iolatency
head:   e4e4c15dbfeb48d4261b3746cd00e77b441be92b
commit: 2598d1c2fa24725d77032c488db69ae4895666bd [5/13] swap,blkcg: issue swap 
io with the appropriate context
config: x86_64-randconfig-s2-05250808 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
        git checkout 2598d1c2fa24725d77032c488db69ae4895666bd
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/asm-generic/bug.h:5:0,
                    from arch/x86/include/asm/bug.h:83,
                    from include/linux/bug.h:5,
                    from include/linux/mmdebug.h:5,
                    from include/linux/mm.h:9,
                    from mm/page_io.c:14:
   mm/page_io.c: In function '__swap_writepage':
   mm/page_io.c:342:10: error: 'struct page' has no member named 'mem_cgroup'
     if (page->mem_cgroup) {
             ^
   include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> mm/page_io.c:342:2: note: in expansion of macro 'if'
     if (page->mem_cgroup) {
     ^~
   mm/page_io.c:342:10: error: 'struct page' has no member named 'mem_cgroup'
     if (page->mem_cgroup) {
             ^
   include/linux/compiler.h:58:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
>> mm/page_io.c:342:2: note: in expansion of macro 'if'
     if (page->mem_cgroup) {
     ^~
   mm/page_io.c:342:10: error: 'struct page' has no member named 'mem_cgroup'
     if (page->mem_cgroup) {
             ^
   include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
>> mm/page_io.c:342:2: note: in expansion of macro 'if'
     if (page->mem_cgroup) {
     ^~
   mm/page_io.c:345:36: error: 'struct page' has no member named 'mem_cgroup'
      blkcg_css = cgroup_get_e_css(page->mem_cgroup->css.cgroup,
                                       ^~
   mm/page_io.c:346:12: error: 'io_cgrp_subsys' undeclared (first use in this 
function)
              &io_cgrp_subsys);
               ^~~~~~~~~~~~~~
   mm/page_io.c:346:12: note: each undeclared identifier is reported only once 
for each function it appears in

vim +/if +342 mm/page_io.c

   277  
   278  int __swap_writepage(struct page *page, struct writeback_control *wbc,
   279                  bio_end_io_t end_write_func)
   280  {
   281          struct bio *bio;
   282          int ret;
   283          struct swap_info_struct *sis = page_swap_info(page);
   284  
   285          VM_BUG_ON_PAGE(!PageSwapCache(page), page);
   286          if (sis->flags & SWP_FILE) {
   287                  struct kiocb kiocb;
   288                  struct file *swap_file = sis->swap_file;
   289                  struct address_space *mapping = swap_file->f_mapping;
   290                  struct bio_vec bv = {
   291                          .bv_page = page,
   292                          .bv_len  = PAGE_SIZE,
   293                          .bv_offset = 0
   294                  };
   295                  struct iov_iter from;
   296  
   297                  iov_iter_bvec(&from, ITER_BVEC | WRITE, &bv, 1, 
PAGE_SIZE);
   298                  init_sync_kiocb(&kiocb, swap_file);
   299                  kiocb.ki_pos = page_file_offset(page);
   300  
   301                  set_page_writeback(page);
   302                  unlock_page(page);
   303                  ret = mapping->a_ops->direct_IO(&kiocb, &from);
   304                  if (ret == PAGE_SIZE) {
   305                          count_vm_event(PSWPOUT);
   306                          ret = 0;
   307                  } else {
   308                          /*
   309                           * In the case of swap-over-nfs, this can be a
   310                           * temporary failure if the system has limited
   311                           * memory for allocating transmit buffers.
   312                           * Mark the page dirty and avoid
   313                           * rotate_reclaimable_page but rate-limit the
   314                           * messages but do not flag PageError like
   315                           * the normal direct-to-bio case as it could
   316                           * be temporary.
   317                           */
   318                          set_page_dirty(page);
   319                          ClearPageReclaim(page);
   320                          pr_err_ratelimited("Write error on dio swapfile 
(%llu)\n",
   321                                             page_file_offset(page));
   322                  }
   323                  end_page_writeback(page);
   324                  return ret;
   325          }
   326  
   327          ret = bdev_write_page(sis->bdev, swap_page_sector(page), page, 
wbc);
   328          if (!ret) {
   329                  count_swpout_vm_event(page);
   330                  return 0;
   331          }
   332  
   333          ret = 0;
   334          bio = get_swap_bio(GFP_NOIO, page, end_write_func);
   335          if (bio == NULL) {
   336                  set_page_dirty(page);
   337                  unlock_page(page);
   338                  ret = -ENOMEM;
   339                  goto out;
   340          }
   341          bio->bi_opf = REQ_OP_WRITE | REQ_SWAP | wbc_to_write_flags(wbc);
 > 342          if (page->mem_cgroup) {
   343                  struct cgroup_subsys_state *blkcg_css;
   344  
   345                  blkcg_css = 
cgroup_get_e_css(page->mem_cgroup->css.cgroup,
   346                                               &io_cgrp_subsys);
   347                  bio_associate_blkcg(bio, blkcg_css);
   348                  css_put(blkcg_css);
   349          }
   350          count_swpout_vm_event(page);
   351          set_page_writeback(page);
   352          unlock_page(page);
   353          submit_bio(bio);
   354  out:
   355          return ret;
   356  }
   357  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to