Re: [PATCHv4 17/17] writeback: lessen sync_supers wakeup count

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Artem Bityutskiy
Date: Thursday, May 27, 2010 - 3:51 am

Nick, thanks for serialization suggestion.

On Thu, 2010-05-27 at 17:22 +1000, Nick Piggin wrote:

It is in mm/backing-dev.c:376 in today's Linus' tree. The -1 is used to
indicate that 'sync_supers()' is in progress and avoid arming timer in
that case. But yes, this is not really needed.


AFAIU, test_and_clear_bit assumes 2 barriers - before the test and after
the clear. Then I do not really understand why this smp_mb is needed.


AFAIU, the following should be fine, no?:


    if (unlikely(!supers_timer_armed))
        if (!test_and_set_bit(0, &supers_timer_armed))
            bdi_arm_supers_timer();

vs

again:
    sync_supers();
    if (test_and_clear_bit(0, &supers_timer_armed))
        goto again;

I assume that it is harmless to run 'bdi_arm_supers_timer()'
concurrently;

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCHv4 00/17] kill unnecessary SB sync wake-ups, Artem Bityutskiy, (Tue May 25, 6:48 am)
[PATCHv4 01/17] VFS: introduce helpers for the s_dirty flag, Artem Bityutskiy, (Tue May 25, 6:48 am)
[PATCHv4 02/17] AFFS: do not manipulate s_dirt directly, Artem Bityutskiy, (Tue May 25, 6:48 am)
[PATCHv4 04/17] BTRFS: do not manipulate s_dirt directly, Artem Bityutskiy, (Tue May 25, 6:48 am)
[PATCHv4 05/17] EXOFS: do not manipulate s_dirt directly, Artem Bityutskiy, (Tue May 25, 6:49 am)
[PATCHv4 06/17] EXT2: do not manipulate s_dirt directly, Artem Bityutskiy, (Tue May 25, 6:49 am)
[PATCHv4 07/17] EXT4: do not manipulate s_dirt directly, Artem Bityutskiy, (Tue May 25, 6:49 am)
[PATCHv4 08/17] FAT: do not manipulate s_dirt directly, Artem Bityutskiy, (Tue May 25, 6:49 am)
[PATCHv4 09/17] HFS: do not manipulate s_dirt directly, Artem Bityutskiy, (Tue May 25, 6:49 am)
[PATCHv4 10/17] HFSPLUS: do not manipulate s_dirt directly, Artem Bityutskiy, (Tue May 25, 6:49 am)
[PATCHv4 11/17] JFFS2: do not manipulate s_dirt directly, Artem Bityutskiy, (Tue May 25, 6:49 am)
[PATCHv4 12/17] reiserfs: do not manipulate s_dirt directly, Artem Bityutskiy, (Tue May 25, 6:49 am)
[PATCHv4 13/17] SYSV: do not manipulate s_dirt directly, Artem Bityutskiy, (Tue May 25, 6:49 am)
[PATCHv4 14/17] UDF: do not manipulate s_dirt directly, Artem Bityutskiy, (Tue May 25, 6:49 am)
[PATCHv4 15/17] UFS: do not manipulate s_dirt directly, Artem Bityutskiy, (Tue May 25, 6:49 am)
[PATCHv4 16/17] VFS: rename s_dirt to s_dirty, Artem Bityutskiy, (Tue May 25, 6:49 am)
[PATCHv4 17/17] writeback: lessen sync_supers wakeup count, Artem Bityutskiy, (Tue May 25, 6:49 am)
Re: [PATCHv4 17/17] writeback: lessen sync_supers wakeup count, Artem Bityutskiy, (Thu May 27, 3:51 am)
Re: [PATCHv4 01/17] VFS: introduce helpers for the s_dirty ..., Artem Bityutskiy, (Sat May 29, 12:59 am)