All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] writeback: sync returns with dirty pages exist
@ 2017-12-04  7:13 xuejiufei
       [not found] ` <dc694ae2-f07f-61e1-7097-7c8411cee12d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: xuejiufei @ 2017-12-04  7:13 UTC (permalink / raw)
  To: cgroups-u79uwXL29TY76Z2rM5mHXA, Tejun Heo

Hello, Tejun,

I have found that system call sync may return even if dirty pages still
exist. This is caused by the following case:

sync
-> sync_inodes_sb()
  -> bdi_split_work_to_wbs() queue works for each wb
  -> wb_wait_for_completions() wait for these works to complete.

>>>>>> race window. Writeback thread found it should switch to another
new wb while doing foreign cgroup detect. So a new wb is created, and
the inodes are move from old wb to the new one. The writeback work for
old wb is done, so the sync process is woken while the inodes with dirty
pages are still queued in new wb.

regards,
Jiufei

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

end of thread, other threads:[~2017-12-19 13:31 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-04  7:13 [bug report] writeback: sync returns with dirty pages exist xuejiufei
     [not found] ` <dc694ae2-f07f-61e1-7097-7c8411cee12d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-04 20:21   ` Tejun Heo
2017-12-05 18:20   ` Tejun Heo
     [not found]     ` <20171205182007.GV2421075-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2017-12-06  1:37       ` xuejiufei
     [not found]         ` <8844b550-d91c-38d5-997a-a899d1e4aa42-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-11 16:42           ` Tejun Heo
2017-12-11 19:50           ` [PATCH] writeback: synchronize sync(2) against cgroup writeback membership switches Tejun Heo
2017-12-11 19:50             ` Tejun Heo
     [not found]             ` <20171211195052.GN2421075-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2017-12-12  6:04               ` xuejiufei
2017-12-12  6:04                 ` xuejiufei
     [not found]                 ` <ca999c10-5e8d-2bb1-c872-70bf13666849-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-12 16:30                   ` Tejun Heo
2017-12-12 16:30                     ` Tejun Heo
2017-12-12 16:38               ` [PATCH v2] " Tejun Heo
2017-12-12 16:38                 ` Tejun Heo
     [not found]                 ` <20171212163830.GC3919388-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2017-12-13 11:00                   ` Jan Kara
2017-12-13 11:00                     ` Jan Kara
2017-12-13 15:39                     ` Tejun Heo
     [not found]                       ` <20171213153930.GO3919388-4dN5La/x3IkLX0oZNxdnEQ2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2017-12-19 13:04                         ` Jan Kara
2017-12-19 13:04                           ` Jan Kara
2017-12-19 13:31                           ` Tejun Heo

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.