public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: William Lee Irwin III <wli@holomorphy.com>,
	"Martin J. Bligh" <Martin.Bligh@us.ibm.com>,
	Daniel Phillips <phillips@bonn-fries.net>,
	Russell King <rmk@arm.linux.org.uk>,
	linux-kernel@vger.kernel.org
Subject: Re: Bug: Discontigmem virt_to_page() [Alpha,ARM,Mips64?]
Date: Fri, 3 May 2002 12:30:09 +0200	[thread overview]
Message-ID: <20020503123009.P11414@dualathlon.random> (raw)
In-Reply-To: <20020502180632.I11414@dualathlon.random> <3972036796.1020330599@[10.10.2.3]> <20020502184037.J11414@dualathlon.random> <20020502171655.GJ32767@holomorphy.com> <20020502204136.M11414@dualathlon.random> <20020502191903.GL32767@holomorphy.com> <20020503080433.R11414@dualathlon.random> <20020503092426.GH24506@holomorphy.com>

On Fri, May 03, 2002 at 02:24:26AM -0700, William Lee Irwin III wrote:
> 64GB machines are not new. NUMA-Q's original OS (DYNIX/ptx) must have
> been doing something radically different, for it appeared to run well
> there, and it did so years ago. The amount of data actually required to

Did you ever benchmarked DYNIX/ptx against Linux on a 64bit machine or
on a 4G x86 machine? Special changes to deal with the small KVA as said
are possible but they will have to affect performance somehow. One way
to reduce the regression on the normal 32bit machines could be to take
the special actions like putting the mem_map in highmem only dependent
on the amount of ram (there would be still the branches for every access
of a page structure, at least unless you take the messy self modifying code
way).

> The answer I seem to hear most often is "get a 64-bit CPU".
> 
> But I believe it's fully possible to get the larger highmem systems to
> what is very near a sane working state and feed back to mainline a good
> portion of the less invasive patches required to address fundamental
> stability issues associated with highmem, and welcome any assistance
> toward that end.

The stability should be just complete in current -aa, it's just the
performance that won't be ok. If you want more cache, larger hashes,
more skb etc... you'll need to pay with something else that would then
only hurt on a 64bit arch or on a smaller box then.

> What is likely the more widely beneficial aspect of this work is that
> it can expose the fundamental stability issues of the highmem
> implementation very readily and so provide users of more common 32-bit
> highmem systems a greater degree of stability than they have previously
> enjoyed owing to kva exhaustion issues.

Agreed, infact if somebody can test current -aa on a 64G x86 box I'd be
glad to hear the results. It should just work stable, at least as far as
the VM is concerned (mainline should have some problem instead), except
it will probably return -ENOMEM on mmap/open/etc.. after you finish
normal_zone, and there can be packet loss too, but that's expected
(CONFIG_2G will make it almost completly usable on the kernel side, but
reducing userspace). The important thing is that it never deadlocks or
malfunction with CONFIG_3G.

> Well, this is certainly not the case with other OS's. The design
> limitations of Linux' i386 memory layout, while they now severely

I see it's limited for your needs on a 64G box, but "limited" looks like
"weak", while it's really the optimal design for 64bit archs and normal
32bit machines.

> hamper performance on NUMA-Q, are a tradeoff that has proved
> advantageous on other platforms, and should be approached with some
> degree of caution even while Martin Bligh (truly above all others),
> myself, and others attempt to address the issues raised by it on NUMA-Q.
> But I believe it is possible to achieve a good degree of virtual
> address space conservation without compromising the general design,
> and if I may be so bold as to speak on behalf of my friends, I believe
> we are willing to, capable of, and now exercising that caution.

Putting the mem_map in highmem would be the first step, after that you
should be just at at the 90% of work done to make it general purpose,
you should wrap most actions on the page struct with wrappers and it
will be quite an invasive change (much more invasive than pte-highmem),
but it could be done. For this one (unlike pte-highmem) you definitely
need a config option to select it, most people doesn't need this feature
enabled because they've less than 8G of ram and also considering it will
have a significant runtime cost.

> On Thu, May 02, 2002 at 12:19:03PM -0700, William Lee Irwin III wrote:
> >> Absolutely; I'd be very supportive of improvements for this case as well.
> >> Many of the systems with the need for discontiguous memory support will
> >> also benefit from parallelizations or other methods of avoiding references
> >> to remote nodes/zones or iterations over all nodes/zones.
> 
> On Fri, May 03, 2002 at 08:04:33AM +0200, Andrea Arcangeli wrote:
> > I would suggest to start on case-by-case basis looking at the profiling,
> > so we make more complex only what is worth to optimize.  For example
> > nr_free_buffer_pages() I guess it will showup because it is used quite
> > frequently.
> 
> I think I see nr_free_pages(), but nr_free_buffer_pages() sounds very
> likely as well. Both of these would likely benefit from per-cpu
> counters.

nr_free_pages() actually could be mostly optimized out by setting
overcommit to 1 :), for the rest is used basically only for /proc/
stats, but yes, with overcommit to 0 (default) every mmap will take the
hit in nr_free_pages() so in most workloads it would be even more
frequent than nr_free_buffer_pages() (with the difference that
nr_free_buffer_pages cannot be avoided).

Andrea

  reply	other threads:[~2002-05-03 10:29 UTC|newest]

Thread overview: 152+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-26 18:27 Bug: Discontigmem virt_to_page() [Alpha,ARM,Mips64?] Russell King
2002-04-26 22:46 ` Andrea Arcangeli
2002-04-29 17:50   ` Martin J. Bligh
2002-04-29 22:00   ` Roman Zippel
2002-04-30  0:43     ` Andrea Arcangeli
2002-04-27 22:10 ` Daniel Phillips
2002-04-29 13:35   ` Andrea Arcangeli
2002-04-29 23:02     ` Daniel Phillips
2002-05-01  2:23       ` Andrea Arcangeli
2002-04-30 23:12         ` Daniel Phillips
2002-05-01  1:05           ` Daniel Phillips
2002-05-02  0:47           ` Andrea Arcangeli
2002-05-01  1:26             ` Daniel Phillips
2002-05-02  1:43               ` Andrea Arcangeli
2002-05-01  2:41                 ` Daniel Phillips
2002-05-02 13:34                   ` Andrea Arcangeli
2002-05-02 15:18                     ` Martin J. Bligh
2002-05-02 15:35                       ` Andrea Arcangeli
2002-05-01 15:42                         ` Daniel Phillips
2002-05-02 16:06                           ` Andrea Arcangeli
2002-05-02 16:10                             ` Martin J. Bligh
2002-05-02 16:40                               ` Andrea Arcangeli
2002-05-02 17:16                                 ` William Lee Irwin III
2002-05-02 18:41                                   ` Andrea Arcangeli
2002-05-02 19:19                                     ` William Lee Irwin III
2002-05-02 19:27                                       ` Daniel Phillips
2002-05-02 19:38                                         ` William Lee Irwin III
2002-05-02 19:58                                           ` Daniel Phillips
2002-05-03  6:28                                           ` Andrea Arcangeli
2002-05-03  6:10                                         ` Andrea Arcangeli
2002-05-02 22:20                                       ` Martin J. Bligh
2002-05-02 21:28                                         ` William Lee Irwin III
2002-05-02 21:52                                           ` Kurt Ferreira
2002-05-02 21:55                                             ` William Lee Irwin III
2002-05-03  6:38                                         ` Andrea Arcangeli
2002-05-03  6:58                                           ` Martin J. Bligh
2002-05-03  6:04                                       ` Andrea Arcangeli
2002-05-03  6:33                                         ` Martin J. Bligh
2002-05-03  8:38                                           ` Andrea Arcangeli
2002-05-03  9:26                                             ` William Lee Irwin III
2002-05-03 15:38                                               ` Martin J. Bligh
2002-05-03 15:17                                             ` Virtual address space exhaustion (was Discontigmem virt_to_page() ) Martin J. Bligh
2002-05-03 15:58                                               ` Andrea Arcangeli
2002-05-03 16:10                                                 ` Martin J. Bligh
2002-05-03 16:25                                                   ` Andrea Arcangeli
2002-05-03 16:02                                               ` Daniel Phillips
2002-05-03 16:20                                                 ` Andrea Arcangeli
2002-05-03 16:41                                                   ` Daniel Phillips
2002-05-03 16:58                                                     ` Andrea Arcangeli
2002-05-03 18:08                                                       ` Daniel Phillips
2002-05-03  9:24                                         ` Bug: Discontigmem virt_to_page() [Alpha,ARM,Mips64?] William Lee Irwin III
2002-05-03 10:30                                           ` Andrea Arcangeli [this message]
2002-05-03 11:09                                             ` William Lee Irwin III
2002-05-03 11:27                                               ` Andrea Arcangeli
2002-05-03 15:42                                             ` Martin J. Bligh
2002-05-03 15:32                                           ` Martin J. Bligh
2002-05-02 19:22                                     ` Daniel Phillips
2002-05-03  6:06                                       ` Andrea Arcangeli
2002-05-02 18:25                                 ` Daniel Phillips
2002-05-02 18:44                                   ` Andrea Arcangeli
2002-05-02 19:31                                 ` Martin J. Bligh
2002-05-02 18:57                                   ` Andrea Arcangeli
2002-05-02 19:08                                     ` Daniel Phillips
2002-05-03  5:15                                       ` Andrea Arcangeli
2002-05-05 23:54                                         ` Daniel Phillips
2002-05-06  0:28                                           ` Andrea Arcangeli
2002-05-06  0:34                                             ` Daniel Phillips
2002-05-06  1:01                                               ` Andrea Arcangeli
2002-05-06  0:55                                           ` Russell King
2002-05-06  1:07                                             ` Daniel Phillips
2002-05-06  1:20                                               ` Andrea Arcangeli
2002-05-06  1:24                                                 ` Daniel Phillips
2002-05-06  1:42                                                   ` Andrea Arcangeli
2002-05-06  1:48                                                     ` Daniel Phillips
2002-05-06  2:06                                                       ` Andrea Arcangeli
2002-05-06 17:40                                                         ` Daniel Phillips
2002-05-06 19:09                                                           ` Martin J. Bligh
2002-05-06  1:09                                             ` Andrea Arcangeli
2002-05-06  1:13                                             ` Daniel Phillips
2002-05-06  2:03                                             ` Daniel Phillips
2002-05-06  2:31                                               ` Andrea Arcangeli
2002-05-06  8:57                                               ` Russell King
2002-05-06  8:54                                           ` Roman Zippel
2002-05-06 15:26                                             ` Daniel Phillips
2002-05-06 19:07                                               ` Roman Zippel
2002-05-08 15:57                                                 ` Daniel Phillips
2002-05-08 23:11                                                   ` Roman Zippel
2002-05-09 16:08                                                     ` Daniel Phillips
2002-05-09 22:06                                                       ` Roman Zippel
2002-05-09 22:22                                                         ` Daniel Phillips
2002-05-09 23:00                                                           ` Roman Zippel
2002-05-09 23:22                                                             ` Daniel Phillips
2002-05-10  0:13                                                               ` Roman Zippel
2002-05-02 22:39                                     ` Martin J. Bligh
2002-05-03  7:04                                       ` Andrea Arcangeli
2002-05-02 23:42                             ` Daniel Phillips
2002-05-03  7:45                               ` Andrea Arcangeli
2002-05-02 16:07                         ` Martin J. Bligh
2002-05-02 16:58                           ` Gerrit Huizenga
2002-05-02 18:10                             ` Andrea Arcangeli
2002-05-02 19:28                               ` Gerrit Huizenga
2002-05-02 22:23                                 ` Martin J. Bligh
2002-05-03  6:20                                 ` Andrea Arcangeli
2002-05-03  6:39                                   ` Martin J. Bligh
2002-05-02 16:00                     ` William Lee Irwin III
2002-05-02  2:37             ` William Lee Irwin III
2002-05-02 15:59               ` Andrea Arcangeli
2002-05-02 16:06                 ` William Lee Irwin III
2002-05-01 18:05         ` Jesse Barnes
2002-05-01 23:17           ` Andrea Arcangeli
2002-05-01 23:23             ` discontiguous memory platforms Jesse Barnes
2002-05-02  0:51               ` Ralf Baechle
2002-05-02  1:27                 ` Andrea Arcangeli
2002-05-02  1:32                   ` Ralf Baechle
2002-05-02  8:50                   ` Roman Zippel
2002-05-01 13:21                     ` Daniel Phillips
2002-05-02 14:00                       ` Roman Zippel
2002-05-01 14:08                         ` Daniel Phillips
2002-05-02 17:56                           ` Roman Zippel
2002-05-01 17:59                             ` Daniel Phillips
2002-05-02 18:26                               ` Roman Zippel
2002-05-02 18:32                                 ` Daniel Phillips
2002-05-02 19:40                                   ` Roman Zippel
2002-05-02 20:14                                     ` Daniel Phillips
2002-05-03  6:34                                       ` Andrea Arcangeli
2002-05-03  9:33                                       ` Roman Zippel
2002-05-03  6:30                                     ` Andrea Arcangeli
2002-05-02 18:35                     ` Geert Uytterhoeven
2002-05-02 18:39                       ` Daniel Phillips
2002-05-02  0:20             ` Bug: Discontigmem virt_to_page() [Alpha,ARM,Mips64?] Anton Blanchard
2002-05-01  1:35               ` Daniel Phillips
2002-05-02  1:45                 ` William Lee Irwin III
2002-05-01  2:02                   ` Daniel Phillips
2002-05-02  2:33                     ` William Lee Irwin III
2002-05-01  2:44                       ` Daniel Phillips
2002-05-02  1:46                 ` Andrea Arcangeli
2002-05-01  1:56                   ` Daniel Phillips
2002-05-02  1:01               ` Andrea Arcangeli
2002-05-02 15:28                 ` Anton Blanchard
2002-05-01 16:10                   ` Daniel Phillips
2002-05-02 15:59                   ` Dave Engebretsen
2002-05-01 17:24                     ` Daniel Phillips
2002-05-02 16:44                       ` Dave Engebretsen
2002-05-02 16:31                   ` William Lee Irwin III
2002-05-02 16:21                     ` Dave Engebretsen
2002-05-02 17:28                       ` William Lee Irwin III
2002-05-02 23:05               ` Daniel Phillips
2002-05-03  0:05                 ` William Lee Irwin III
2002-05-03  1:19                   ` Daniel Phillips
2002-05-03 19:47                     ` Dave Engebretsen
2002-05-03 22:06                       ` Daniel Phillips
2002-05-03 23:52               ` David Mosberger

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=20020503123009.P11414@dualathlon.random \
    --to=andrea@suse.de \
    --cc=Martin.Bligh@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phillips@bonn-fries.net \
    --cc=rmk@arm.linux.org.uk \
    --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