Re: [PATCH v2 2/2] bcache: Move journal work to new background wq

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

 



> As far as I understand the code, this would trigger an immediate
> journal flush then under memory reclaim because this background wq is
> only used to reschedule journal flush some time in the future (100ms?)
> if there's nothing to write just now:

Thinking about this again, the code looks like it tries to coalesce
journal flushes into windows of 100ms, and the dirty flag is just used
as an indicator to know whether the flush has already been queued. Is
that true?

> >         } else if (!w->dirty) {
> >                 w->dirty = true;
> > -               schedule_delayed_work(&c->journal.work,
> > -                                     msecs_to_jiffies(c->journal_delay_ms));
> > +               queue_delayed_work(bch_background_wq, &c->journal.work,
> > +                                  msecs_to_jiffies(c->journal_delay_ms));
> >                 spin_unlock(&c->journal.lock);
> >         } else {

This would mean we start performing worse under memory reclaim...

Thanks,
Kai



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux