From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Rubin Subject: Re: [PATCH 1/3] writeback: Creating /sys/kernel/mm/writeback/writeback Date: Sat, 19 Jun 2010 10:44:46 -0700 Message-ID: References: <1276907415-504-1-git-send-email-mrubin@google.com> <1276907415-504-2-git-send-email-mrubin@google.com> <20100619104439.GA7659@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE 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, axboe@kernel.dk To: Christoph Hellwig Return-path: Received: from smtp-out.google.com ([74.125.121.35]:57112 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755819Ab0FSRpL convert rfc822-to-8bit (ORCPT ); Sat, 19 Jun 2010 13:45:11 -0400 In-Reply-To: <20100619104439.GA7659@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Thanks for looking at this. On Sat, Jun 19, 2010 at 3:44 AM, Christoph Hellwig wrote: > 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. =A0Please do something like > > /proc/sys/vm/writeback/ > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pages_dirtied > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0pages_cleaned > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0dirty_threshold > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0background_threshold > > where you can just read the value from the file. Cool. This is kind of funny. In the google tree I implemented this in the same multi-file-one-value-in-file manner. The debate on one file for all vs that style was heated. And I changed it before sending upstream. I really don't care either way. So I will just change the patch and move the values to that location Do you mind explaining why something would go in /proc/ vs /sys? I thought the idea was to not put things in /proc anymore. >> 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) >> =A0 =A0 =A0 } while (bh =3D bh->b_this_page, bh2 =3D bh2->b_this_pag= e, bh !=3D head); >> =A0 =A0 =A0 kunmap_atomic(kaddr, KM_USER0); >> >> - =A0 =A0 if (!TestSetPageWriteback(clone_page)) >> + =A0 =A0 if (!TestSetPageWriteback(clone_page)) { >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 inc_zone_page_state(clone_page, NR_WRITE= BACK); >> + =A0 =A0 =A0 =A0 =A0 =A0 inc_zone_page_state(clone_page, NR_PAGES_E= NTERED_WRITEBACK); >> + =A0 =A0 } >> =A0 =A0 =A0 unlock_page(clone_page); > > I'm not very happy about having this opencoded in a filesystem. I wasn't excited about this section either. What does opencoded mean? Do you mean it should not be exposed to specific fs code? mrubin -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html