Re: [PATCH 09/27] nfs: writeback pages wait queue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2011-03-03 at 14:45 +0800, Wu Fengguang wrote:
> +static void nfs_wakeup_congested(long nr,
> +                                struct backing_dev_info *bdi,
> +                                wait_queue_head_t *wqh)
> +{
> +       long limit = nfs_congestion_kb >> (PAGE_SHIFT - 10);
> +
> +       if (nr < 2 * limit - min(limit / 8, NFS_WAIT_PAGES)) {
> +               if (test_bit(BDI_sync_congested, &bdi->state)) {
> +                       clear_bdi_congested(bdi, BLK_RW_SYNC);
> +                       smp_mb__after_clear_bit();
> +               }
> +               if (waitqueue_active(&wqh[BLK_RW_SYNC]))
> +                       wake_up(&wqh[BLK_RW_SYNC]);
> +       }
> +       if (nr < limit - min(limit / 8, NFS_WAIT_PAGES)) {
> +               if (test_bit(BDI_async_congested, &bdi->state)) {
> +                       clear_bdi_congested(bdi, BLK_RW_ASYNC);
> +                       smp_mb__after_clear_bit();
> +               }
> +               if (waitqueue_active(&wqh[BLK_RW_ASYNC]))
> +                       wake_up(&wqh[BLK_RW_ASYNC]);
> +       }
> +} 

memory barriers want a comment - always - explaining what they order and
against whoem.

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux