All of lore.kernel.org
 help / color / mirror / Atom feed
* f2fs page flag set with private but page.private pointer is NULL
@ 2018-09-11  3:03 Kassey
  2018-09-11 10:21 ` Chao Yu
  2018-09-18  2:32 ` Jaegeuk Kim
  0 siblings, 2 replies; 3+ messages in thread
From: Kassey @ 2018-09-11  3:03 UTC (permalink / raw)
  To: Jaegeuk Kim, Chao Yu, Jonathan Corbet, linux-f2fs-devel

hi, Jaegeuk:

   we got some easy reproduced issue when doing reboot test.
   that the android init is sleep on a page to be writebback.
   from the ftrace we can confirm wb_workfn got running each 5s.
   but init has stuck for quite long time because below page can not
be writeback done.

   by check the page's member(a_ops) , we can see that is  f2fs page
and private is NULL.

   can you help to give some suggest  ?


   crash> kmem 0xFFFFFFBF01B6C840

      PAGE               PHYSICAL      MAPPING       INDEX CNT FLAGS

ffffffbf01b6c840         6db21000 ffffffc0964d1bc0       5c  2 1292c
referenced,uptodate,lru,owner_priv_1,private,writeback,mappedtodisk

crash> struct page  0xFFFFFFBF01B6C840
struct page {
  flags = 76076,
  {
    mapping = 0xffffffc0964d1bc0,
    s_mem = 0xffffffc0964d1bc0,
    compound_mapcount = {
      counter = -1773331520
    }
  },
  {
    index = 92,
    freelist = 0x5c
  },
  {
    counters = 12884901887,
    {
      {
        _mapcount = {
          counter = -1
        },
        active = 4294967295,
        {
          inuse = 65535,
          objects = 32767,
          frozen = 1
        },
        units = -1
      },
      _refcount = {
        counter = 2
      }
    }
  },
  {
    lru = {
      next = 0xffffffbf02bd9520,
      prev = 0xffffffbf01b66960
    },
    pgmap = 0xffffffbf02bd9520,
    {
      next = 0xffffffbf02bd9520,
      pages = 28731744,
      pobjects = -65
    },
    callback_head = {
      next = 0xffffffbf02bd9520,
      func = 0xffffffbf01b66960
    },
    {
      compound_head = 18446743794582656288,
      compound_dtor = 28731744,
      compound_order = 4294967231
    }
  },
  {
    private = 0,
    ptl = 0x0,
    slab_cache = 0x0
  }
}


init:


-000|__switch_to()

-001|__schedule()

-002|need_resched(inline)

-002|schedule()

-003|schedule_timeout()

-004|get_current(inline)

-004|io_schedule_timeout()

-005|bit_wait_io()

-006|__wait_on_bit()

-007|wait_on_page_bit()

-008|PageWriteback(inline)

-008|wait_on_page_writeback(inline)

-008|__filemap_fdatawait_range()

-009|filemap_fdatawait_keep_errors()

-010|sync_inodes_sb()

-011|__sync_filesystem(inline)

-011|sync_filesystem()

-012|generic_shutdown_super()

-013|kill_block_super()

-014|kill_f2fs_super()

-015|deactivate_locked_super()

-016|deactivate_super()

-017|mnt_free_id(inline)

-017|cleanup_mnt()

-018|__cleanup_mnt()

-019|task_work_run()

-020|do_notify_resume()

-021|work_pending(asm)

-->|exception

-022|NUX:0x539E58(asm)

---|end of frame


-- 
Best regards
Kassey

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: f2fs page flag set with private but page.private pointer is NULL
  2018-09-11  3:03 f2fs page flag set with private but page.private pointer is NULL Kassey
@ 2018-09-11 10:21 ` Chao Yu
  2018-09-18  2:32 ` Jaegeuk Kim
  1 sibling, 0 replies; 3+ messages in thread
From: Chao Yu @ 2018-09-11 10:21 UTC (permalink / raw)
  To: Kassey, Jaegeuk Kim, Jonathan Corbet, linux-f2fs-devel

Hi Kassey,

I sent a patch to solve potential deadlock, but not sure it can fix your
problem, could you try that patch?

[PATCH] f2fs: submit cached bio to avoid endless PageWriteback

On 2018/9/11 11:03, Kassey wrote:
> hi, Jaegeuk:
> 
>    we got some easy reproduced issue when doing reboot test.
>    that the android init is sleep on a page to be writebback.
>    from the ftrace we can confirm wb_workfn got running each 5s.
>    but init has stuck for quite long time because below page can not
> be writeback done.
> 
>    by check the page's member(a_ops) , we can see that is  f2fs page
> and private is NULL.
> 
>    can you help to give some suggest  ?
> 
> 
>    crash> kmem 0xFFFFFFBF01B6C840
> 
>       PAGE               PHYSICAL      MAPPING       INDEX CNT FLAGS
> 
> ffffffbf01b6c840         6db21000 ffffffc0964d1bc0       5c  2 1292c
> referenced,uptodate,lru,owner_priv_1,private,writeback,mappedtodisk
> 
> crash> struct page  0xFFFFFFBF01B6C840
> struct page {
>   flags = 76076,
>   {
>     mapping = 0xffffffc0964d1bc0,
>     s_mem = 0xffffffc0964d1bc0,
>     compound_mapcount = {
>       counter = -1773331520
>     }
>   },
>   {
>     index = 92,
>     freelist = 0x5c
>   },
>   {
>     counters = 12884901887,
>     {
>       {
>         _mapcount = {
>           counter = -1
>         },
>         active = 4294967295,
>         {
>           inuse = 65535,
>           objects = 32767,
>           frozen = 1
>         },
>         units = -1
>       },
>       _refcount = {
>         counter = 2
>       }
>     }
>   },
>   {
>     lru = {
>       next = 0xffffffbf02bd9520,
>       prev = 0xffffffbf01b66960
>     },
>     pgmap = 0xffffffbf02bd9520,
>     {
>       next = 0xffffffbf02bd9520,
>       pages = 28731744,
>       pobjects = -65
>     },
>     callback_head = {
>       next = 0xffffffbf02bd9520,
>       func = 0xffffffbf01b66960
>     },
>     {
>       compound_head = 18446743794582656288,
>       compound_dtor = 28731744,
>       compound_order = 4294967231
>     }
>   },
>   {
>     private = 0,
>     ptl = 0x0,
>     slab_cache = 0x0
>   }
> }
> 
> 
> init:
> 
> 
> -000|__switch_to()
> 
> -001|__schedule()
> 
> -002|need_resched(inline)
> 
> -002|schedule()
> 
> -003|schedule_timeout()
> 
> -004|get_current(inline)
> 
> -004|io_schedule_timeout()
> 
> -005|bit_wait_io()
> 
> -006|__wait_on_bit()
> 
> -007|wait_on_page_bit()
> 
> -008|PageWriteback(inline)
> 
> -008|wait_on_page_writeback(inline)
> 
> -008|__filemap_fdatawait_range()
> 
> -009|filemap_fdatawait_keep_errors()
> 
> -010|sync_inodes_sb()
> 
> -011|__sync_filesystem(inline)
> 
> -011|sync_filesystem()
> 
> -012|generic_shutdown_super()
> 
> -013|kill_block_super()
> 
> -014|kill_f2fs_super()
> 
> -015|deactivate_locked_super()
> 
> -016|deactivate_super()
> 
> -017|mnt_free_id(inline)
> 
> -017|cleanup_mnt()
> 
> -018|__cleanup_mnt()
> 
> -019|task_work_run()
> 
> -020|do_notify_resume()
> 
> -021|work_pending(asm)
> 
> -->|exception
> 
> -022|NUX:0x539E58(asm)
> 
> ---|end of frame
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: f2fs page flag set with private but page.private pointer is NULL
  2018-09-11  3:03 f2fs page flag set with private but page.private pointer is NULL Kassey
  2018-09-11 10:21 ` Chao Yu
@ 2018-09-18  2:32 ` Jaegeuk Kim
  1 sibling, 0 replies; 3+ messages in thread
From: Jaegeuk Kim @ 2018-09-18  2:32 UTC (permalink / raw)
  To: Kassey; +Cc: linux-f2fs-devel, Jonathan Corbet

Hi Kassey,

On 09/11, Kassey wrote:
> hi, Jaegeuk:
> 
>    we got some easy reproduced issue when doing reboot test.
>    that the android init is sleep on a page to be writebback.
>    from the ftrace we can confirm wb_workfn got running each 5s.
>    but init has stuck for quite long time because below page can not
> be writeback done.

Could you please share kernel version and how many patches you have done
cherry-pick from f2fs-stable or android-common?

> 
>    by check the page's member(a_ops) , we can see that is  f2fs page
> and private is NULL.
> 
>    can you help to give some suggest  ?
> 
> 
>    crash> kmem 0xFFFFFFBF01B6C840
> 
>       PAGE               PHYSICAL      MAPPING       INDEX CNT FLAGS
> 
> ffffffbf01b6c840         6db21000 ffffffc0964d1bc0       5c  2 1292c
> referenced,uptodate,lru,owner_priv_1,private,writeback,mappedtodisk
> 
> crash> struct page  0xFFFFFFBF01B6C840
> struct page {
>   flags = 76076,
>   {
>     mapping = 0xffffffc0964d1bc0,

Can you check mapping->host->i_ino?

>     s_mem = 0xffffffc0964d1bc0,
>     compound_mapcount = {
>       counter = -1773331520
>     }
>   },
>   {
>     index = 92,
>     freelist = 0x5c
>   },
>   {
>     counters = 12884901887,
>     {
>       {
>         _mapcount = {
>           counter = -1
>         },
>         active = 4294967295,
>         {
>           inuse = 65535,
>           objects = 32767,
>           frozen = 1
>         },
>         units = -1
>       },
>       _refcount = {
>         counter = 2
>       }
>     }
>   },
>   {
>     lru = {
>       next = 0xffffffbf02bd9520,
>       prev = 0xffffffbf01b66960
>     },
>     pgmap = 0xffffffbf02bd9520,
>     {
>       next = 0xffffffbf02bd9520,
>       pages = 28731744,
>       pobjects = -65
>     },
>     callback_head = {
>       next = 0xffffffbf02bd9520,
>       func = 0xffffffbf01b66960
>     },
>     {
>       compound_head = 18446743794582656288,
>       compound_dtor = 28731744,
>       compound_order = 4294967231
>     }
>   },
>   {
>     private = 0,

F2FS sets Private for most of pages, which is quite weird to me.

>     ptl = 0x0,
>     slab_cache = 0x0
>   }
> }
> 
> 
> init:
> 
> 
> -000|__switch_to()
> 
> -001|__schedule()
> 
> -002|need_resched(inline)
> 
> -002|schedule()
> 
> -003|schedule_timeout()
> 
> -004|get_current(inline)
> 
> -004|io_schedule_timeout()
> 
> -005|bit_wait_io()
> 
> -006|__wait_on_bit()
> 
> -007|wait_on_page_bit()

Could you check whether any IOs were pending in block layer or UFS/eMMC layer?

Thasnk,

> 
> -008|PageWriteback(inline)
> 
> -008|wait_on_page_writeback(inline)
> 
> -008|__filemap_fdatawait_range()
> 
> -009|filemap_fdatawait_keep_errors()
> 
> -010|sync_inodes_sb()
> 
> -011|__sync_filesystem(inline)
> 
> -011|sync_filesystem()
> 
> -012|generic_shutdown_super()
> 
> -013|kill_block_super()
> 
> -014|kill_f2fs_super()
> 
> -015|deactivate_locked_super()
> 
> -016|deactivate_super()
> 
> -017|mnt_free_id(inline)
> 
> -017|cleanup_mnt()
> 
> -018|__cleanup_mnt()
> 
> -019|task_work_run()
> 
> -020|do_notify_resume()
> 
> -021|work_pending(asm)
> 
> -->|exception
> 
> -022|NUX:0x539E58(asm)
> 
> ---|end of frame
> 
> 
> -- 
> Best regards
> Kassey

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-09-18  2:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-11  3:03 f2fs page flag set with private but page.private pointer is NULL Kassey
2018-09-11 10:21 ` Chao Yu
2018-09-18  2:32 ` Jaegeuk Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.