public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Artem Bityutskiy <dedekind@yandex.ru>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: forcing write-back from FS - again
Date: Mon, 22 Oct 2007 02:55:16 -0700	[thread overview]
Message-ID: <20071022025516.848198f3.akpm@linux-foundation.org> (raw)
In-Reply-To: <471C6FA8.30500@yandex.ru>

On Mon, 22 Oct 2007 12:38:48 +0300 Artem Bityutskiy <dedekind@yandex.ru> wrote:

> Andrew Morton wrote:
> >> diff --git a/include/linux/writeback.h b/include/linux/writeback.h
> >> @@ -28,6 +28,7 @@ static inline int task_is_pdflush(struct task_struct *task)
> >>    */
> >>   enum writeback_sync_modes {
> >>          WB_SYNC_NONE,   /* Don't wait on anything */
> >> +       WB_SYNC_NONE_PG,/* Don't wait on anything, don't touch locked pages */
> >>          WB_SYNC_ALL,    /* Wait on every mapping */
> >>          WB_SYNC_HOLD,   /* Hold the inode on sb_dirty for sys_sync() */
> >>   };
> > 
> > It would be simpler/safer/saner to add a new bitflag to writeback_control
> > and use that directly.  The WB_SYNC_foo flags are a holdover from an
> > earlier time and really should be made to go away, in favour of directly
> > setting up an appropriate writeback_control.
> 
> You mean something like (wbc->flags & WB_SYNC_NONE) etc? But below you used 
> wbc->skip_locked_pages, I'm confused.

take a look at struct writeback_control:

        unsigned nonblocking:1;         /* Don't get stuck on request queues */
        unsigned encountered_congestion:1; /* An output: a queue is full */
        unsigned for_kupdate:1;         /* A kupdate writeback */
        unsigned for_reclaim:1;         /* Invoked from the page allocator */
        unsigned for_writepages:1;      /* This is a writepages() call */
        unsigned range_cyclic:1;        /* range_start is cyclic */
        unsigned more_io:1;             /* more io to be dispatched */

Add another one...

  reply	other threads:[~2007-10-22  9:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-21 20:19 forcing write-back from FS - again Artem Bityutskiy
2007-10-21 20:55 ` Andrew Morton
2007-10-22  8:52   ` Artem Bityutskiy
2007-10-22  9:05     ` Andrew Morton
2007-10-22  9:38       ` Artem Bityutskiy
2007-10-22  9:55         ` Andrew Morton [this message]
2007-10-22 10:04           ` Artem Bityutskiy

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=20071022025516.848198f3.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dedekind@yandex.ru \
    --cc=linux-kernel@vger.kernel.org \
    /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