From: "Bret Towe" <magnade@gmail.com>
To: "Nikita Danilov" <nikita@clusterfs.com>
Cc: "Ananiev, Leonid I" <leonid.i.ananiev@intel.com>,
"Linux Kernel Mailing List" <Linux-Kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: moving dirty pages balancing to pdfludh entirely
Date: Tue, 4 Jul 2006 15:24:54 -0700 [thread overview]
Message-ID: <dda83e780607041524g5ae996fes6e579464a1af56ad@mail.gmail.com> (raw)
In-Reply-To: <17578.52643.364026.64265@gargle.gargle.HOWL>
On 7/4/06, Nikita Danilov <nikita@clusterfs.com> wrote:
> Ananiev, Leonid I writes:
> > Nikita Danilov writes:
> > > When queue is congested---it is, because meta-data (indirect blocks in
> > > ext[23] case) have to be read in synchronously before page can be
> > paged
> > > out (see comment in mm/vmscan.c:pageout()).
> >
> > Actually a queue is congested ---it is, because the queue is too long or
> > bit BDI_write[read]_congested is set.
> >
> > > But much more importantly: when direct reclaim skips writing dirty
> > pages
> > > from tail of the inactive list,
> >
> > The direct reclaim does not skip any page in pdflush thread because
> > may_write_to_queue() returns true
> > if (current->flags & PF_SWAPWRITE) and: __pdflush() sets this flag:
> > See pfflush.c: __pdflush() first line
> > current->flags |= PF_FLUSHER | PF_SWAPWRITE;
>
> Hm.. indeed it is. But this is quite strange. This means, that if some
> device queues are congested, pdflush threads will be stuck waiting for
> these queues to drain, and as there is only limited number of pdflush
> threads in the system, write-out to the non-congested devices will not
> progress too.
>
> Doing large amounts of writeback from pdflush threads makes situation
> only worse: suppose you have more than MAX_PDFLUSH_THREADS devices on
> the system, and large number of writing threads. If some devices become
> congested, then *all* pdflush threads may easily stuck waiting on queue
> congestion and there will be no IO going on against other devices. This
> would be especially bad, if system is a mix of slow and fast devices.
>
> In the original code, threads writing into fast devices are not impacted
> by congestion of slow devices.
are you sure about that? cause that sounded alot like an issue
i saw with slow usb devices (mainly a usb hd on a usb 1.1 connection)
the usb device would fill up with write queue and local io to say /dev/hda
would basicly stop and the system would be rather useless till the usb
hd would finish writing out what it was doing
usally would take several hundred megs of data to get it to do it
ive not tried it in ages so maybe its been fixed since ive last tried it
dont recall the kernel version at the time but it wasnt more than a
year ago
> You can deal with that particular situation in your patch by checking
> return value of
>
> pdflush_operation(background_writeout, 0);
>
> and falling back to synchronous write-back if it fails to find worker
> thread.
>
> >
> > > Wouldn't this interfere with current->backing_dev_info logic?
> > > Maybe pdflush threads should set this field too?
> > It is not need to set current->backing_dev_info for pdflush because
>
> Yes, that was silly proposal. I think your patch contains very useful
> idea, but it cannot be applied to all file systems. Maybe
> wait-for-pdflush can be made optional, depending on the file system
> type?
>
> > PF_SWAPWRITE is set for pdflush.
> > The proposed patch does not concern of backing_dev_info logic.
> >
> > Leonid
>
> Nikita.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
next prev parent reply other threads:[~2006-07-04 22:24 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-04 19:12 Ananiev, Leonid I
2006-07-04 20:20 ` Nikita Danilov
2006-07-04 22:24 ` Bret Towe [this message]
2006-07-05 10:20 ` Nikita Danilov
2006-07-05 17:19 ` Bret Towe
-- strict thread matches above, loose matches on Subject: below --
2006-07-06 21:07 Ananiev, Leonid I
2006-07-06 16:33 Ananiev, Leonid I
2006-07-06 17:37 ` Nikita Danilov
2006-07-06 13:54 Ananiev, Leonid I
2006-07-06 15:16 ` Nikita Danilov
2006-07-06 11:47 Ananiev, Leonid I
2006-07-06 4:30 Ananiev, Leonid I
2006-07-06 6:34 ` Nikita Danilov
2006-07-05 19:50 Ananiev, Leonid I
2006-07-05 20:05 ` Nikita Danilov
2006-07-05 19:28 Ananiev, Leonid I
2006-07-05 20:14 ` Nikita Danilov
2006-07-05 18:10 Ananiev, Leonid I
2006-07-05 19:07 ` Nikita Danilov
2006-07-05 15:48 Ananiev, Leonid I
2006-07-05 14:28 Ananiev, Leonid I
2006-07-05 14:57 ` Nikita Danilov
2006-07-05 5:40 Ananiev, Leonid I
2006-07-05 10:17 ` Nikita Danilov
[not found] <B41635854730A14CA71C92B36EC22AAC0541F6@mssmsx411>
2006-07-04 13:12 ` Nikita Danilov
2006-07-04 13:07 Ananiev, Leonid I
2006-07-04 11:43 Ananiev, Leonid I
2006-07-04 11:56 ` Nikita Danilov
2006-07-04 9:55 Nikita Danilov
2006-07-04 9:44 Ananiev, Leonid I
2006-07-04 8:35 Ananiev, Leonid I
2006-07-03 16:43 Ananiev, Leonid I
2006-07-04 8:32 ` Nikita Danilov
2006-06-27 5:31 Ananiev, Leonid I
2006-06-28 11:33 ` Nikita Danilov
2006-07-03 17:31 ` Antonio Vargas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dda83e780607041524g5ae996fes6e579464a1af56ad@mail.gmail.com \
--to=magnade@gmail.com \
--cc=Linux-Kernel@vger.kernel.org \
--cc=leonid.i.ananiev@intel.com \
--cc=nikita@clusterfs.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®