linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Michael Rubin <mrubin@google.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-mm@kvack.org, jack@suse.cz, akpm@linux-foundation.org,
	david@fromorbit.com, hch@lst.de, axboe@kernel.dk
Subject: Re: [PATCH 1/3] writeback: Creating /sys/kernel/mm/writeback/writeback
Date: Sat, 19 Jun 2010 12:44:39 +0200	[thread overview]
Message-ID: <20100619104439.GA7659@lst.de> (raw)
In-Reply-To: <1276907415-504-2-git-send-email-mrubin@google.com>

On Fri, Jun 18, 2010 at 05:30:13PM -0700, Michael Rubin wrote:
> Adding the /sys/kernel/mm/writeback/writeback file.  It contains data
> to help developers and applications gain visibility into writeback
> behaviour.
> 
>     # cat /sys/kernel/mm/writeback/writeback
>     pages_dirtied:    3747
>     pages_cleaned:    3618
>     dirty_threshold:  816673
>     bg_threshold:     408336

I'm fine with exposting this. but the interface is rather awkward.
These kinds of multiple value per file interface require addition
parsing and are a pain to extend.  Please do something like

/proc/sys/vm/writeback/

			pages_dirtied
			pages_cleaned
			dirty_threshold
			background_threshold

where you can just read the value from the file.

> diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
> index c920164..84b0181 100644
> --- a/fs/nilfs2/segment.c
> +++ b/fs/nilfs2/segment.c
> @@ -1598,8 +1598,10 @@ nilfs_copy_replace_page_buffers(struct page *page, struct list_head *out)
>  	} while (bh = bh->b_this_page, bh2 = bh2->b_this_page, bh != head);
>  	kunmap_atomic(kaddr, KM_USER0);
>  
> -	if (!TestSetPageWriteback(clone_page))
> +	if (!TestSetPageWriteback(clone_page)) {
>  		inc_zone_page_state(clone_page, NR_WRITEBACK);
> +		inc_zone_page_state(clone_page, NR_PAGES_ENTERED_WRITEBACK);
> +	}
>  	unlock_page(clone_page);

I'm not very happy about having this opencoded in a filesystem.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2010-06-19 10:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-19  0:30 [PATCH 0/3] writeback visibility Michael Rubin
2010-06-19  0:30 ` [PATCH 1/3] writeback: Creating /sys/kernel/mm/writeback/writeback Michael Rubin
2010-06-19 10:44   ` Christoph Hellwig [this message]
2010-06-19 17:44     ` Michael Rubin
2010-06-19  0:30 ` [PATCH 2/3] writeback: per bdi monitoring Michael Rubin
2010-06-19  0:30 ` [PATCH 3/3] writeback: tracking subsystems causing writeback Michael Rubin
2010-06-19  8:17   ` Andi Kleen
2010-06-19 17:49     ` Michael Rubin
2010-06-19 20:23       ` Andi Kleen
2010-06-20 23:10 ` [PATCH 0/3] writeback visibility Dave Chinner
2010-06-21 17:09   ` Michael Rubin
2010-06-24  0:02     ` Dave Chinner
2010-06-25  7:15       ` Michael Rubin

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=20100619104439.GA7659@lst.de \
    --to=hch@lst.de \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=david@fromorbit.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mrubin@google.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;
as well as URLs for NNTP newsgroup(s).