public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans Reiser <reiser@namesys.com>
To: Andreas Dilger <adilger@turbolabs.com>
Cc: Chris Mason <mason@suse.com>,
	Rik van Riel <riel@conectiva.com.br>,
	Shawn Starr <spstarr@sh0n.net>,
	linux-kernel@vger.kernel.org, ext2-devel@lists.sourceforge.net
Subject: Re: Possible Idea with filesystem buffering.
Date: Tue, 22 Jan 2002 14:39:10 +0300	[thread overview]
Message-ID: <3C4D4F5E.2000106@namesys.com> (raw)
In-Reply-To: <Pine.LNX.4.33L.0201211153110.32617-100000@imladris.surriel.com> <3C4C20A2.9040009@namesys.com> <1780530000.1011633710@tiny> <3C4C5414.2090104@namesys.com> <1819870000.1011642257@tiny> <3C4C7D08.2020707@namesys.com> <1854570000.1011649986@tiny> <20020121230249.P4014@lynx.turbolabs.com>

So is there a consensus view that we need 2 calls, one to write a 
particular page, and one to exert memory pressure, and the call to write 
a particular page should only be used when we really need to write that 
particular page?

Are we sure this meets the needs of memory zones, which I need to learn 
more about the architecture of?

Hans

Andreas Dilger wrote:

>On Jan 21, 2002  16:53 -0500, Chris Mason wrote:
>
>>On Monday, January 21, 2002 11:41:44 PM +0300 Hans Reiser wrote:
>>
>>>help me to understand what you mean by triggered.  Do you
>>>mean VM sends pressure to the FS?  Do you mean that VM understands what a
>>>transaction is?  Is this that generic journaling layer trying to come
>>>alive as a piece of the VM?  I am definitely confused.
>>>
>>The vm doesn't know what a transaction is.  But, the vm might know that
>>a) this block is pinned by the FS for write ordering reasons
>>b) the cost of writing this block is X
>>c) calling page->somefunc will trigger writes on those blocks.
>>
>>The cost could be in order of magnitude, the idea would be to give the FS
>>the chance to say 'one a scale of 1 to 10, writing this block will hurt
>>this much'.  Some blocks might have negative costs, meaning they don't
>>depend on anything and help free others.
>>
>>The same system can be used for transactions and delayed allocation,
>>without telling the VM about any specifics.  
>>
>>>I think what I need to understand, is do you see the VM as telling the FS
>>>when it has (too many dirty pages or too many clean pages) and letting
>>>the FS choose to commit a transaction if it wants to as its way of
>>>cleaning pages, or do you see the VM as telling the FS to commit a
>>>transaction?
>>>
>>I see the VM calling page->somefunc to flush that page, triggering whatever
>>events the FS feels are necessary.  We might want some way to differentiate
>>between periodic writes and memory pressure, so the FS has the option of
>>doing fancier things during write throttling.
>>
>
>The ext3 developers have also been wanting things like this for a long time,
>both having a "memory pressure" notification, and a differentiation between
>"write this now" and "this is a periodic sync, write some stuff".  I've
>CC'd them in case they want to contribute.
>
>There are also other non-core caches in the kernel which could benefit
>from having a generic "memory pressure" notification.  Having a generic
>memory pressure notification helps reduce (but not eliminate) the need
>to call "write this page now" into the filesystem.
>
>My guess would be that having calls into the FS with "priorities", just
>like shrink_dcache_memory() does, would allow the FS to make more
>intelligent decisions about what to write/free _before_ you get to the
>stage where the VM is in a panic and is telling you _specifically_ what
>to write/free/etc.
>
>>>If you think that VM should tell the FS when it has too many pages, does
>>>that mean that the VM understands that a particular page in the subcache
>>>has not been accessed recently enough?  Is that the pivot point of our
>>>disagreement?
>>>
>>Pretty much.  I don't think the VM should say 'you have too many pages', I
>>think it should say 'free this page'.  
>>
>
>As above, it should have the capability to do both, depending on the
>circumstances.  The FS can obviously make better judgements locally about
>what to write under normal circumstances, so it should be given the best
>chance to do so.
>
>The VM can make better _specific_ judgements when it needs to (e.g. free
>a DMA page or another specific page to allow a larger contiguous chunk of
>memory to be allocated), but in the cases where it just wants _some_ page(s)
>to be freed, it should allow the FS to decide which one(s), if it cares.
>
>Cheers, Andreas
>--
>Andreas Dilger
>http://sourceforge.net/projects/ext2resize/
>http://www-mddsp.enel.ucalgary.ca/People/adilger/
>
>
>




  parent reply	other threads:[~2002-01-22 11:43 UTC|newest]

Thread overview: 92+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-20  9:04 Possible Idea with filesystem buffering Shawn
2002-01-20 11:31 ` Hans Reiser
2002-01-20 13:56   ` Rik van Riel
2002-01-20 14:21     ` Hans Reiser
2002-01-20 15:13       ` Rik van Riel
2002-01-20 21:15         ` Hans Reiser
2002-01-20 21:24           ` Rik van Riel
2002-01-20 21:30             ` Hans Reiser
2002-01-20 21:40               ` Rik van Riel
2002-01-20 21:49                 ` Hans Reiser
2002-01-20 22:00                   ` Rik van Riel
2002-01-21  0:10                   ` Matt
2002-01-21  0:57                     ` Hans Reiser
2002-01-21  1:28                     ` Anton Altaparmakov
2002-01-21  2:29                       ` Shawn Starr
2002-01-21 19:15                         ` Shawn Starr
2002-01-22 22:02                           ` Hans Reiser
2002-01-21  9:21                     ` Horst von Brand
2002-01-21  9:13                   ` Horst von Brand
2002-01-21 15:29               ` Eric W. Biederman
2002-01-20 17:51       ` Mark Hahn
2002-01-20 21:24         ` Hans Reiser
2002-01-20 21:32           ` Rik van Riel
2002-01-21 15:37           ` Eric W. Biederman
2002-01-20 22:45   ` Shawn Starr
2002-01-20 23:11     ` Rik van Riel
2002-01-20 23:40       ` Shawn Starr
2002-01-20 23:48         ` Rik van Riel
2002-01-21  0:44           ` Hans Reiser
2002-01-21  0:52             ` Rik van Riel
2002-01-21  1:08               ` Hans Reiser
2002-01-21  1:39                 ` Rik van Riel
2002-01-21 11:10                   ` Hans Reiser
2002-01-21 12:12                     ` Rik van Riel
2002-01-21 13:42                       ` Hans Reiser
2002-01-21 13:54                         ` Rik van Riel
2002-01-21 14:07                           ` Hans Reiser
2002-01-21 17:21                             ` Chris Mason
2002-01-21 17:47                               ` Hans Reiser
2002-01-21 19:44                                 ` Chris Mason
2002-01-21 20:41                                   ` Hans Reiser
2002-01-21 21:53                                     ` Chris Mason
2002-01-22  6:02                                       ` Andreas Dilger
2002-01-22 10:09                                         ` Tommi Kyntola
2002-01-22 11:39                                         ` Hans Reiser [this message]
2002-01-22 18:41                                           ` Andrew Morton
2002-01-22 19:03                                             ` Rik van Riel
2002-01-23 20:35                                               ` [Ext2-devel] " Stephen C. Tweedie
2002-01-23 20:48                                                 ` Hans Reiser
2002-01-23 20:55                                                 ` Andrew Morton
2002-01-23 23:53                                                 ` Hugh Dickins
2002-01-24  0:01                                                   ` Jeff Garzik
2002-01-22 20:19                                             ` Hans Reiser
2002-01-22 20:50                                               ` Rik van Riel
2002-01-22 14:03                                         ` Chris Mason
2002-01-22 14:39                                           ` Rik van Riel
2002-01-22 18:46                                             ` Hans Reiser
2002-01-22 19:19                                               ` Chris Mason
2002-01-22 20:13                                                 ` Steve Lord
2002-01-22 21:22                                                   ` Chris Mason
2002-01-22 20:32                                                 ` Hans Reiser
2002-01-22 21:08                                                   ` Chris Mason
2002-01-22 22:05                                                     ` Hans Reiser
2002-01-22 22:21                                                       ` Rik van Riel
2002-01-23  0:16                                                         ` Hans Reiser
2002-01-22 22:10                                                     ` Richard B. Johnson
2002-01-23  1:14                                                     ` Stuart Young
2002-01-23 17:16                                                     ` Daniel Phillips
2002-01-22 21:12                                                   ` Rik van Riel
2002-01-22 21:28                                                     ` Shawn Starr
2002-01-22 21:31                                                       ` Rik van Riel
2002-01-22 20:20                                               ` Rik van Riel
2002-01-22 22:31                                                 ` Hans Reiser
2002-01-22 23:34                                                   ` Rik van Riel
2002-01-23 17:15                                                 ` Josh MacDonald
2002-01-21  0:28       ` Hans Reiser
2002-01-21  0:47         ` Rik van Riel
2002-01-21  1:01           ` Hans Reiser
2002-01-21  1:21             ` Rik van Riel
2002-01-21  1:26               ` Hans Reiser
2002-01-21  1:40                 ` Rik van Riel
2002-01-20 15:49 ` Anton Altaparmakov
2002-01-20 21:21   ` Hans Reiser
  -- strict thread matches above, loose matches on Subject: below --
2002-01-22 21:02 Rolf Lear
     [not found] <Pine.LNX.4.33L.0201222008280.32617-100000@imladris.surriel.com>
2002-01-22 23:31 ` Shawn Starr
2002-01-22 23:37   ` Rik van Riel
2002-01-23  5:26     ` Shawn Starr
2002-01-23  9:43 Martin Knoblauch
2002-01-23 11:52 ` Helge Hafting
2002-01-23 12:02   ` Rik van Riel
2002-01-23 12:11   ` Martin Knoblauch
     [not found] <Pine.LNX.4.33.0201231301560.24338-100000@coffee.psychology.mcmaster.ca>
     [not found] ` <3C4FC478.BCC44CDF@TeraPort.de>
     [not found]   ` <3C4FDB80.C9F83EBB@aitel.hist.no>
2002-01-24 13:59     ` Martin Knoblauch

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=3C4D4F5E.2000106@namesys.com \
    --to=reiser@namesys.com \
    --cc=adilger@turbolabs.com \
    --cc=ext2-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mason@suse.com \
    --cc=riel@conectiva.com.br \
    --cc=spstarr@sh0n.net \
    /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