Re: [PATCH 02/18] writeback: dirty position control

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

 



On Mon, Sep 05, 2011 at 11:05:57PM +0800, Peter Zijlstra wrote:
> On Sun, 2011-09-04 at 09:53 +0800, Wu Fengguang wrote:
> > @@ -591,6 +790,7 @@ static void global_update_bandwidth(unsi
> >  
> >  void __bdi_update_bandwidth(struct backing_dev_info *bdi,
> >                             unsigned long thresh,
> > +                           unsigned long bg_thresh,
> >                             unsigned long dirty,
> >                             unsigned long bdi_thresh,
> >                             unsigned long bdi_dirty,
> > @@ -627,6 +827,7 @@ snapshot:
> >  
> >  static void bdi_update_bandwidth(struct backing_dev_info *bdi,
> >                                  unsigned long thresh,
> > +                                unsigned long bg_thresh,
> >                                  unsigned long dirty,
> >                                  unsigned long bdi_thresh,
> >                                  unsigned long bdi_dirty,
> > @@ -635,8 +836,8 @@ static void bdi_update_bandwidth(struct 
> >         if (time_is_after_eq_jiffies(bdi->bw_time_stamp + BANDWIDTH_INTERVAL))
> >                 return;
> >         spin_lock(&bdi->wb.list_lock);
> > -       __bdi_update_bandwidth(bdi, thresh, dirty, bdi_thresh, bdi_dirty,
> > -                              start_time);
> > +       __bdi_update_bandwidth(bdi, thresh, bg_thresh, dirty,
> > +                              bdi_thresh, bdi_dirty, start_time);
> >         spin_unlock(&bdi->wb.list_lock);
> >  }
> >  
> > @@ -677,7 +878,8 @@ static void balance_dirty_pages(struct a
> >                  * catch-up. This avoids (excessively) small writeouts
> >                  * when the bdi limits are ramping up.
> >                  */
> > -               if (nr_dirty <= (background_thresh + dirty_thresh) / 2)
> > +               if (nr_dirty <= dirty_freerun_ceiling(dirty_thresh,
> > +                                                     background_thresh))
> >                         break;
> >  
> >                 bdi_thresh = bdi_dirty_limit(bdi, dirty_thresh);
> > @@ -721,8 +923,9 @@ static void balance_dirty_pages(struct a
> >                 if (!bdi->dirty_exceeded)
> >                         bdi->dirty_exceeded = 1;
> >  
> > -               bdi_update_bandwidth(bdi, dirty_thresh, nr_dirty,
> > -                                    bdi_thresh, bdi_dirty, start_time);
> > +               bdi_update_bandwidth(bdi, dirty_thresh, background_thresh,
> > +                                    nr_dirty, bdi_thresh, bdi_dirty,
> > +                                    start_time);
> >  
> >                 /* Note: nr_reclaimable denotes nr_dirty + nr_unstable.
> >                  * Unstable writes are a feature of certain networked
> > --- linux-next.orig/fs/fs-writeback.c   2011-08-26 15:57:18.000000000 +0800
> > +++ linux-next/fs/fs-writeback.c        2011-08-26 15:57:20.000000000 +0800
> > @@ -675,7 +675,7 @@ static inline bool over_bground_thresh(v
> >  static void wb_update_bandwidth(struct bdi_writeback *wb,
> >                                 unsigned long start_time)
> >  {
> > -       __bdi_update_bandwidth(wb->bdi, 0, 0, 0, 0, start_time);
> > +       __bdi_update_bandwidth(wb->bdi, 0, 0, 0, 0, 0, start_time);
> >  }
> >  
> >  /*
> > --- linux-next.orig/include/linux/writeback.h   2011-08-26 15:57:18.000000000 +0800
> > +++ linux-next/include/linux/writeback.h        2011-08-26 15:57:20.000000000 +0800
> > @@ -141,6 +141,7 @@ unsigned long bdi_dirty_limit(struct bac
> >  
> >  void __bdi_update_bandwidth(struct backing_dev_info *bdi,
> >                             unsigned long thresh,
> > +                           unsigned long bg_thresh,
> >                             unsigned long dirty,
> >                             unsigned long bdi_thresh,
> >                             unsigned long bdi_dirty,
> 
> 
> All this function signature muck doesn't seem immediately relevant to
> the introduction of bdi_position_ratio() since the new function isn't
> actually used.

Ahh, you are right.

I'll just make the chunks a standalone patch. Logically they are more
related to patch 03 "writeback: dirty rate control", however let's not
add burden to the already complex patch 03..

Thanks,
Fengguang
--
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