linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hugh Dickins <hugh@veritas.com>
To: Brent Casavant <bcasavan@sgi.com>
Cc: William Lee Irwin III <wli@holomorphy.com>, linux-mm@kvack.org
Subject: Re: Scaling problem with shmem_sb_info->stat_lock
Date: Tue, 13 Jul 2004 21:41:34 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.44.0407132113350.8577-100000@localhost.localdomain> (raw)
In-Reply-To: <Pine.SGI.4.58.0407131449330.111843@kzerza.americas.sgi.com>

On Tue, 13 Jul 2004, Brent Casavant wrote:
> On Mon, 12 Jul 2004, Brent Casavant wrote:
> 
> > The complication with this is that we'd either need to redefine
> > i_blocks in the inode structure (somehow I don't see that happening),
> > or move that field up into the shmem_inode_info structure and make
> > the necessary code adjustments.
> 
> Better idea, maybe.
> 
> Jack Steiner suggested to me that we really don't care about accounting
> for i_blocks and free_blocks for /dev/zero mappings (question: Is he
> right?).

I think Jack's right: there's no visible mount point for df or du,
the files come ready-unlinked, nobody has an fd.

Though wli's per-cpu idea was sensible enough, converting to that
didn't appeal to me very much.  We only have a limited amount of
per-cpu space, I think, but an indefinite number of tmpfs mounts.
Might be reasonable to allow per-cpu for 4 or them (the internal
one which is troubling you, /dev/shm, /tmp and one other).  Tiresome.

Jack's perception appeals to me much more
(but, like you, I do wonder if it'll really work out in practice).

> If so, then it seems to me we could turn on a bit in the flags field
> of the shmem_inode_info structure that says "don't bother with bookkeeping
> for me".  We can then test for that flag wherever i_blocks and free_blocks
> are updated, and omit the update if appropriate.  This leaves tmpfs
> working appropriately for its "filesystem" role, and avoids the
> cacheline bouncing problem for its "shared /dev/zero mappings" role.
> 
> Assuming this is correct, I imagine I should just snag the next
> bit in the flags field (bit 0 is SHMEM_PAGEIN (== VM_READ) and
> bit 1 is SHMEM_TRUNCATE (== VM_WRITE), I'd use bit 2 for
> SHMEM_NOACCT (== VM_EXEC)) and run with this idea, right?

Yes, go ahead, though it's getting more and more embarrassing that I
started out reusing VM_ACCOUNT within shmem.c, it should now have its
own set of flags: let me tidy that up once you're done.  (Something
else I should do for your scalability is stop putting everything on
on the shmem_inodes list: that's only needed when pages are on swap.)

But please don't call the new one SHMEM_NOACCT: ACCT or ACCOUNT refers
to the security_vm_enough_memory/vm_unacct_memory stuff throughout,
and _that_ accounting does still apply to these /dev/zero files.

Hmm, I was about to suggest SHMEM_NOSBINFO,
but how about really no sbinfo, just NULL sbinfo?

Hugh

--
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:"aart@kvack.org"> aart@kvack.org </a>

  reply	other threads:[~2004-07-13 20:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-12 21:11 Brent Casavant
2004-07-12 21:55 ` William Lee Irwin III
2004-07-12 22:42   ` Brent Casavant
2004-07-13 19:56     ` Brent Casavant
2004-07-13 20:41       ` Hugh Dickins [this message]
2004-07-13 21:35         ` Brent Casavant
2004-07-13 22:50           ` William Lee Irwin III
2004-07-13 22:22         ` William Lee Irwin III
2004-07-13 22:27         ` Brent Casavant
2004-07-28  9:26         ` Andrew Morton
2004-07-28  9:59           ` William Lee Irwin III
2004-07-28 22:21             ` Brent Casavant
2004-07-28 23:05               ` Andrew Morton
2004-07-28 23:40                 ` Brent Casavant
2004-07-28 23:53                   ` William Lee Irwin III
2004-07-28 23:53               ` William Lee Irwin III
2004-07-29 14:54                 ` Brent Casavant
2004-07-29 19:58               ` Hugh Dickins
2004-07-29 21:21                 ` Brent Casavant
2004-07-29 21:51                   ` Brent Casavant
2004-07-30  1:00                 ` William Lee Irwin III
2004-07-30 21:40                 ` Brent Casavant
2004-07-30 23:34                   ` Paul Jackson
2004-07-31  3:37                     ` Ray Bryant

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=Pine.LNX.4.44.0407132113350.8577-100000@localhost.localdomain \
    --to=hugh@veritas.com \
    --cc=bcasavan@sgi.com \
    --cc=linux-mm@kvack.org \
    --cc=wli@holomorphy.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