kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: fs.rajat@gmail.com (Rajat Sharma)
To: kernelnewbies@lists.kernelnewbies.org
Subject: cache quota
Date: Thu, 6 Jan 2011 18:32:37 +0530	[thread overview]
Message-ID: <AANLkTimjD71iA8_cOKsG9kquLuttCtqv9s=q80pXnmKR@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimrOfHT7H=6PL=tXDEuQEinsa2RaH8sXfhWm8Oq@mail.gmail.com>

Hi Sanoj,

Linux page cache is a shared resource which any process accessing the file
can access. There is no mechanism within generic page cache handler to
support such quota mechanism, as there is no meta information attached with
the page in pagecache.

However it looks possible to me to implement it within a file-system by
defining a wrapper structure above each page in page-cache which can hold
per user information about the page. NFS maintains a wrapper structure
nfs_page over dirty page-cache pages and maintains credentials of user
within this structure. However purpose of doing so is for correctness and
flush any incompatible pages to NFS server before writing new dirty page to
page cache.

It feasible to implement such quota schemes, but may come up with some
performance implications and maintenance cost will be high for such a code.
But anyways, if you plan to implement such a file-system (or modify existing
one), it can be a nice learning project. Infact many people keep looking for
kernel project on this list, this looks to me a great idea for that matter.

Rajat

On Thu, Jan 6, 2011 at 3:25 PM, sanoj <k.u.sanoj@gmail.com> wrote:
> Hello
> my doubt is if linux has any user quota for the usage of page cache,
> i.e. if a user is doing a disk intensive operation, will the I/O
performance
> for other users other users be affected as they
> may incur more cache misses.
> thanks,
> sanoj
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110106/dc57acf0/attachment-0001.html 

      reply	other threads:[~2011-01-06 13:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-06  9:55 cache quota sanoj
2011-01-06 13:02 ` Rajat Sharma [this message]

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='AANLkTimjD71iA8_cOKsG9kquLuttCtqv9s=q80pXnmKR@mail.gmail.com' \
    --to=fs.rajat@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.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;
as well as URLs for NNTP newsgroup(s).