* Re: [RFC] Convert pgtable cache to slab
2004-10-13 18:47 [RFC] Convert pgtable cache to slab Martin K. Petersen
@ 2004-10-13 18:57 ` Jesse Barnes
2004-10-13 18:59 ` William Lee Irwin III
` (15 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Jesse Barnes @ 2004-10-13 18:57 UTC (permalink / raw)
To: linux-ia64
On Wednesday, October 13, 2004 1:47 pm, Martin K. Petersen wrote:
> This patch makes the page table cache on IA-64 use the slab instead of
> standard page allocations. It's based upon Bill Irwin's code for
> ppc64.
>
> With this patch I got a significant improvement in page fault time.
> Standard 2.4.x was about 700ns on average. Generic 2.6.9rc4 is 3-4
> usec, whereas the slabified pgtcache drops us back down to 600-700 ns.
>
> Tested on zx1 and sn2.
>
> The biggest caveat is that I've had to postpone setting up the gate
> page until the pgt slab has been initialized. That wasn't an issue
> with the existing page-based allocation scheme. David - how do you
> prefer I handle this?
>
> Comments?
Looks really nice, it's good to see a diffstat with "5 files changed, 50
insertions(+), 125 deletions(-)" that actually speeds things up and makes the
code more sensible.
Jesse
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [RFC] Convert pgtable cache to slab
2004-10-13 18:47 [RFC] Convert pgtable cache to slab Martin K. Petersen
2004-10-13 18:57 ` Jesse Barnes
@ 2004-10-13 18:59 ` William Lee Irwin III
2004-10-13 19:07 ` Luck, Tony
` (14 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: William Lee Irwin III @ 2004-10-13 18:59 UTC (permalink / raw)
To: linux-ia64
On Wed, Oct 13, 2004 at 02:47:43PM -0400, Martin K. Petersen wrote:
> This patch makes the page table cache on IA-64 use the slab instead of
> standard page allocations. It's based upon Bill Irwin's code for
> ppc64.
> With this patch I got a significant improvement in page fault time.
> Standard 2.4.x was about 700ns on average. Generic 2.6.9rc4 is 3-4
> usec, whereas the slabified pgtcache drops us back down to 600-700 ns.
> Tested on zx1 and sn2.
> The biggest caveat is that I've had to postpone setting up the gate
> page until the pgt slab has been initialized. That wasn't an issue
> with the existing page-based allocation scheme. David - how do you
> prefer I handle this?
Nice! I got reports that it would not be beneficial when I thought
about going over this earlier. I suppose it's a small vindication
of my methods to see the original objection contradicted here. =)
-- wli
^ permalink raw reply [flat|nested] 18+ messages in thread* RE: [RFC] Convert pgtable cache to slab
2004-10-13 18:47 [RFC] Convert pgtable cache to slab Martin K. Petersen
2004-10-13 18:57 ` Jesse Barnes
2004-10-13 18:59 ` William Lee Irwin III
@ 2004-10-13 19:07 ` Luck, Tony
2004-10-13 19:28 ` Jesse Barnes
` (13 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Luck, Tony @ 2004-10-13 19:07 UTC (permalink / raw)
To: linux-ia64
>With this patch I got a significant improvement in page fault time.
>Standard 2.4.x was about 700ns on average. Generic 2.6.9rc4 is 3-4
>usec, whereas the slabified pgtcache drops us back down to 600-700 ns.
What was the benchmark you were running when you measured these?
>Tested on zx1 and sn2.
How does this scale on big sn2 systems? I assume that the answers are
going to be just fine as the slab allocator per-cpu lists should be
just as nice as local quicklists, but it would be nice to see some
data.
>The biggest caveat is that I've had to postpone setting up the gate
>page until the pgt slab has been initialized. That wasn't an issue
>with the existing page-based allocation scheme. David - how do you
>prefer I handle this?
I don't see the code for this postponement in this patch.
>Comments?
Overall looks nice ... less code, and goes faster too, what more
could we ask for!
Perhaps "zero_cache" isn't as descriptive a name as it might be (not
that I have any better suggestions :-(
-Tony
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [RFC] Convert pgtable cache to slab
2004-10-13 18:47 [RFC] Convert pgtable cache to slab Martin K. Petersen
` (2 preceding siblings ...)
2004-10-13 19:07 ` Luck, Tony
@ 2004-10-13 19:28 ` Jesse Barnes
2004-10-13 19:32 ` Martin K. Petersen
` (12 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Jesse Barnes @ 2004-10-13 19:28 UTC (permalink / raw)
To: linux-ia64
On Wednesday, October 13, 2004 2:07 pm, Luck, Tony wrote:
> >With this patch I got a significant improvement in page fault time.
> >Standard 2.4.x was about 700ns on average. Generic 2.6.9rc4 is 3-4
> >usec, whereas the slabified pgtcache drops us back down to 600-700 ns.
>
> What was the benchmark you were running when you measured these?
>
> >Tested on zx1 and sn2.
>
> How does this scale on big sn2 systems? I assume that the answers are
> going to be just fine as the slab allocator per-cpu lists should be
> just as nice as local quicklists, but it would be nice to see some
> data.
Yeah, it would be interesting, though page faults in general don't scale very
well due to the way page_table_lock is used. Christoph had some patches for
that, but I don't think he's had time to work on them lately.
> Overall looks nice ... less code, and goes faster too, what more
> could we ask for!
>
> Perhaps "zero_cache" isn't as descriptive a name as it might be (not
> that I have any better suggestions :-(
Maybe pgtable_zero_cache or something?
Jesse
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [RFC] Convert pgtable cache to slab
2004-10-13 18:47 [RFC] Convert pgtable cache to slab Martin K. Petersen
` (3 preceding siblings ...)
2004-10-13 19:28 ` Jesse Barnes
@ 2004-10-13 19:32 ` Martin K. Petersen
2004-10-13 19:32 ` Luck, Tony
` (11 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Martin K. Petersen @ 2004-10-13 19:32 UTC (permalink / raw)
To: linux-ia64
>>>>> "Tony" = Luck, Tony <tony.luck@intel.com> writes:
Tony,
Tony> What was the benchmark you were running when you measured these?
I'm going to let Robin send you his test case.
Tony> How does this scale on big sn2 systems? I assume that the
Tony> answers are going to be just fine as the slab allocator per-cpu
Tony> lists should be just as nice as local quicklists, but it would
Tony> be nice to see some data.
The tests above are from a 64-way Altix.
I'm still looking into the issue of freed data ending up in other
nodes' slabs. Don't know if anybody else have been working on this?
>> The biggest caveat is that I've had to postpone setting up the gate
>> page until the pgt slab has been initialized. That wasn't an issue
>> with the existing page-based allocation scheme. David - how do you
>> prefer I handle this?
Tony> I don't see the code for this postponement in this patch.
It's there. End of the mm/init.c hunk.
Tony> Perhaps "zero_cache" isn't as descriptive a name as it might be
Tony> (not that I have any better suggestions :-(
Yeah, this is what Bill called it on ppc64. pgtable_cache perhaps?
--
Martin K. Petersen Wild Open Source, Inc.
mkp@wildopensource.com http://www.wildopensource.com/
^ permalink raw reply [flat|nested] 18+ messages in thread* RE: [RFC] Convert pgtable cache to slab
2004-10-13 18:47 [RFC] Convert pgtable cache to slab Martin K. Petersen
` (4 preceding siblings ...)
2004-10-13 19:32 ` Martin K. Petersen
@ 2004-10-13 19:32 ` Luck, Tony
2004-10-13 19:42 ` Martin K. Petersen
` (10 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Luck, Tony @ 2004-10-13 19:32 UTC (permalink / raw)
To: linux-ia64
>> Perhaps "zero_cache" isn't as descriptive a name as it might be (not
>> that I have any better suggestions :-(
>
>Maybe pgtable_zero_cache or something?
I thought along those lines at first, but actually this cache would be
useful for any allocation that needed a page that has been pre-zeroed.
So I don't think that the "pgtable" part is helpful. Some sense of the
fact that the objects are one page big is what I was looking for.
-Tony
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [RFC] Convert pgtable cache to slab
2004-10-13 18:47 [RFC] Convert pgtable cache to slab Martin K. Petersen
` (5 preceding siblings ...)
2004-10-13 19:32 ` Luck, Tony
@ 2004-10-13 19:42 ` Martin K. Petersen
2004-10-13 19:49 ` Robin Holt
` (9 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Martin K. Petersen @ 2004-10-13 19:42 UTC (permalink / raw)
To: linux-ia64
>>>>> "Tony" = Luck, Tony <tony.luck@intel.com> writes:
>>> Perhaps "zero_cache" isn't as descriptive a name as it might be
>>> (not that I have any better suggestions :-(
>> Maybe pgtable_zero_cache or something?
Tony> I thought along those lines at first, but actually this cache
Tony> would be useful for any allocation that needed a page that has
Tony> been pre-zeroed. So I don't think that the "pgtable" part is
Tony> helpful. Some sense of the fact that the objects are one page
Tony> big is what I was looking for.
Yeah. I suspect that's why Bill named it that in the first place.
What about zeroed_page_cache?
Now, this opens up another can of worms in terms of where to
initialize that cache in the first place. pgtable_cache_init() might
not be the best place if it's generally used. Only requirement is
that it needs to be early.
--
Martin K. Petersen Silicon Graphics, Inc.
mkp@sgi.com http://www.sgi.com/
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [RFC] Convert pgtable cache to slab
2004-10-13 18:47 [RFC] Convert pgtable cache to slab Martin K. Petersen
` (6 preceding siblings ...)
2004-10-13 19:42 ` Martin K. Petersen
@ 2004-10-13 19:49 ` Robin Holt
2004-10-13 19:50 ` Robin Holt
` (8 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Robin Holt @ 2004-10-13 19:49 UTC (permalink / raw)
To: linux-ia64
On Wed, Oct 13, 2004 at 03:32:43PM -0400, Martin K. Petersen wrote:
> >>>>> "Tony" = Luck, Tony <tony.luck@intel.com> writes:
>
> Tony,
>
> Tony> What was the benchmark you were running when you measured these?
>
> I'm going to let Robin send you his test case.
Martin, can you send your updated test case. I believe yours is just mine
with a higher resolution timer. If you are uncomfortable with that, let
me know.
>
>
> Tony> How does this scale on big sn2 systems? I assume that the
> Tony> answers are going to be just fine as the slab allocator per-cpu
> Tony> lists should be just as nice as local quicklists, but it would
> Tony> be nice to see some data.
>
> The tests above are from a 64-way Altix.
>
> I'm still looking into the issue of freed data ending up in other
> nodes' slabs. Don't know if anybody else have been working on this?
When I tried to measure these on a large multi-threaded job, the difference
got lost in the noise.
>
>
> >> The biggest caveat is that I've had to postpone setting up the gate
> >> page until the pgt slab has been initialized. That wasn't an issue
> >> with the existing page-based allocation scheme. David - how do you
> >> prefer I handle this?
>
> Tony> I don't see the code for this postponement in this patch.
>
> It's there. End of the mm/init.c hunk.
>
>
> Tony> Perhaps "zero_cache" isn't as descriptive a name as it might be
> Tony> (not that I have any better suggestions :-(
>
> Yeah, this is what Bill called it on ppc64. pgtable_cache perhaps?
If we are renaming things, can we rename zero_ctor to something a little
more sensible.
>
> --
> Martin K. Petersen Wild Open Source, Inc.
> mkp@wildopensource.com http://www.wildopensource.com/
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [RFC] Convert pgtable cache to slab
2004-10-13 18:47 [RFC] Convert pgtable cache to slab Martin K. Petersen
` (7 preceding siblings ...)
2004-10-13 19:49 ` Robin Holt
@ 2004-10-13 19:50 ` Robin Holt
2004-10-13 20:23 ` Luck, Tony
` (7 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Robin Holt @ 2004-10-13 19:50 UTC (permalink / raw)
To: linux-ia64
On Wed, Oct 13, 2004 at 03:42:48PM -0400, Martin K. Petersen wrote:
> >>>>> "Tony" = Luck, Tony <tony.luck@intel.com> writes:
>
> >>> Perhaps "zero_cache" isn't as descriptive a name as it might be
> >>> (not that I have any better suggestions :-(
> >> Maybe pgtable_zero_cache or something?
>
> Tony> I thought along those lines at first, but actually this cache
> Tony> would be useful for any allocation that needed a page that has
> Tony> been pre-zeroed. So I don't think that the "pgtable" part is
> Tony> helpful. Some sense of the fact that the objects are one page
> Tony> big is what I was looking for.
>
> Yeah. I suspect that's why Bill named it that in the first place.
>
> What about zeroed_page_cache?
>
> Now, this opens up another can of worms in terms of where to
> initialize that cache in the first place. pgtable_cache_init() might
> not be the best place if it's generally used. Only requirement is
> that it needs to be early.
Why don't we start with it here and move the init when we know who
the other users will be. Just my 2 cents.
Robin
>
> --
> Martin K. Petersen Silicon Graphics, Inc.
> mkp@sgi.com http://www.sgi.com/
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 18+ messages in thread* RE: [RFC] Convert pgtable cache to slab
2004-10-13 18:47 [RFC] Convert pgtable cache to slab Martin K. Petersen
` (8 preceding siblings ...)
2004-10-13 19:50 ` Robin Holt
@ 2004-10-13 20:23 ` Luck, Tony
2004-10-13 20:34 ` Martin K. Petersen
` (6 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Luck, Tony @ 2004-10-13 20:23 UTC (permalink / raw)
To: linux-ia64
>Tony> I don't see the code for this postponement in this patch.
>
>It's there. End of the mm/init.c hunk.
Ok, I see it now ... the perils of reading the patch rather than
applying it and looking at the code that you end up with. I see
that ia32_mem_init() got dragged along too.
This is pretty messy in terms of code legibility. I think that
the right thing to do is get zero_cache (or whatever we call it)
initialized way, way early ... so we don't have these ugly code
paths where gate pages are being setup in pgtable_cache_init()!
Think you can sell LKML on a generic change to initialize this
cache in mm/slab.c??? It might not be too hard, this patch started
out on PPC, other architectures might also be able to to the same
thing for their page tables (as well as potential other uses in
generic code ... of course concrete examples would be way better
than my handwaving about how nice this might be).
-Tony
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [RFC] Convert pgtable cache to slab
2004-10-13 18:47 [RFC] Convert pgtable cache to slab Martin K. Petersen
` (9 preceding siblings ...)
2004-10-13 20:23 ` Luck, Tony
@ 2004-10-13 20:34 ` Martin K. Petersen
2004-10-13 20:37 ` Martin K. Petersen
` (5 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Martin K. Petersen @ 2004-10-13 20:34 UTC (permalink / raw)
To: linux-ia64
>>>>> "Robin" = Robin Holt <holt@sgi.com> writes:
Robin> Martin, can you send your updated test case. I believe yours
Robin> is just mine with a higher resolution timer.
Sure. Included below.
--
Martin K. Petersen Silicon Graphics, Inc.
mkp@sgi.com http://www.sgi.com/
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/prctl.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <time.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define PAGE_SIZE getpagesize()
#define PTES_PER_PMD (PAGE_SIZE / 8)
#define STRIDE PTES_PER_PMD * PAGE_SIZE
#define FAULTS_TO_CAUSE 32
#define MAPPING_SIZE FAULTS_TO_CAUSE * STRIDE
#define LOOPS_TO_TIME 128
int main(int argc, char **argv)
{
long offset, i, j;
char * mapping;
volatile char z;
pid_t child;
int child_status;
int fd;
long long start, end;
struct timespec ts;
mapping = mmap(NULL, (size_t) MAPPING_SIZE, PROT_READ,
MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
if ((unsigned long) mapping = -1UL) {
perror("Mapping failed.\n");
exit(0);
}
for (j=0; j < LOOPS_TO_TIME; j++) {
child = fork();
if (child > 0) {
wait(&child_status);
} else if (child = 0) {
clock_gettime(CLOCK_REALTIME, &ts);
start = ts.tv_sec * 1000000000 + ts.tv_nsec;
for (i = 0; i < FAULTS_TO_CAUSE; i++) {
offset = i * STRIDE;
z = mapping[offset];
}
clock_gettime(CLOCK_REALTIME, &ts);
end = ts.tv_sec * 1000000000 + ts.tv_nsec;
printf("Took %lld nanoseconds per fault\n",
(end-start) / FAULTS_TO_CAUSE);
exit(0);
} else {
printf ("Fork failed\n");
}
}
munmap(mapping, (size_t) MAPPING_SIZE);
return 0;
}
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [RFC] Convert pgtable cache to slab
2004-10-13 18:47 [RFC] Convert pgtable cache to slab Martin K. Petersen
` (10 preceding siblings ...)
2004-10-13 20:34 ` Martin K. Petersen
@ 2004-10-13 20:37 ` Martin K. Petersen
2004-10-14 7:44 ` David Mosberger
` (4 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Martin K. Petersen @ 2004-10-13 20:37 UTC (permalink / raw)
To: linux-ia64
>>>>> "Tony" = Luck, Tony <tony.luck@intel.com> writes:
Tony> Ok, I see it now ... the perils of reading the patch rather than
Tony> applying it and looking at the code that you end up with. I see
Tony> that ia32_mem_init() got dragged along too.
*nod*
Tony> This is pretty messy in terms of code legibility.
I agree completely. I never intended for them to permanently live
there. I was just looking for suggestions for a more appropriate
location.
Tony> Think you can sell LKML on a generic change to initialize this
Tony> cache in mm/slab.c???
I'll try.
Thanks!
--
Martin K. Petersen Silicon Graphics, Inc.
mkp@sgi.com http://www.sgi.com/
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [RFC] Convert pgtable cache to slab
2004-10-13 18:47 [RFC] Convert pgtable cache to slab Martin K. Petersen
` (11 preceding siblings ...)
2004-10-13 20:37 ` Martin K. Petersen
@ 2004-10-14 7:44 ` David Mosberger
2004-10-14 10:27 ` William Lee Irwin III
` (3 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: David Mosberger @ 2004-10-14 7:44 UTC (permalink / raw)
To: linux-ia64
>>>>> On Wed, 13 Oct 2004 11:59:56 -0700, William Lee Irwin III <wli@holomorphy.com> said:
William> On Wed, Oct 13, 2004 at 02:47:43PM -0400, Martin
William> K. Petersen wrote:
>> This patch makes the page table cache on IA-64 use the slab
>> instead of standard page allocations. It's based upon Bill
>> Irwin's code for ppc64. With this patch I got a significant
>> improvement in page fault time. Standard 2.4.x was about 700ns
>> on average. Generic 2.6.9rc4 is 3-4 usec, whereas the slabified
>> pgtcache drops us back down to 600-700 ns. Tested on zx1 and
>> sn2. The biggest caveat is that I've had to postpone setting up
>> the gate page until the pgt slab has been initialized. That
>> wasn't an issue with the existing page-based allocation scheme.
>> David - how do you prefer I handle this?
William> Nice! I got reports that it would not be beneficial when I
William> thought about going over this earlier. I suppose it's a
William> small vindication of my methods to see the original
William> objection contradicted here. =)
What was the original comment relative to? 2.4 or 2.6? In 2.6 we
lost the PTE quick-list, which I think is where the big overhead came
from. Right, Martin?
--david
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [RFC] Convert pgtable cache to slab
2004-10-13 18:47 [RFC] Convert pgtable cache to slab Martin K. Petersen
` (12 preceding siblings ...)
2004-10-14 7:44 ` David Mosberger
@ 2004-10-14 10:27 ` William Lee Irwin III
2004-10-14 11:00 ` David Mosberger
` (2 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: William Lee Irwin III @ 2004-10-14 10:27 UTC (permalink / raw)
To: linux-ia64
At some point in the comment, I wrote:
William> Nice! I got reports that it would not be beneficial when I
William> thought about going over this earlier. I suppose it's a
William> small vindication of my methods to see the original
William> objection contradicted here. =)
On Thu, Oct 14, 2004 at 12:44:59AM -0700, David Mosberger wrote:
> What was the original comment relative to? 2.4 or 2.6? In 2.6 we
> lost the PTE quick-list, which I think is where the big overhead came
> from. Right, Martin?
I don't recall much of the original comment, apart from that someone
said it had too much overhead. I may have presumed too much when I
presumed it was 2.6
-- wli
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [RFC] Convert pgtable cache to slab
2004-10-13 18:47 [RFC] Convert pgtable cache to slab Martin K. Petersen
` (13 preceding siblings ...)
2004-10-14 10:27 ` William Lee Irwin III
@ 2004-10-14 11:00 ` David Mosberger
2004-10-14 11:07 ` Robin Holt
2004-10-14 11:10 ` David Mosberger
16 siblings, 0 replies; 18+ messages in thread
From: David Mosberger @ 2004-10-14 11:00 UTC (permalink / raw)
To: linux-ia64
>>>>> On Thu, 14 Oct 2004 03:27:42 -0700, William Lee Irwin III <wli@holomorphy.com> said:
wli> At some point in the comment, I wrote:
William> Nice! I got reports that it would not be beneficial when I
William> thought about going over this earlier. I suppose it's a
William> small vindication of my methods to see the original
William> objection contradicted here. =)
wli> On Thu, Oct 14, 2004 at 12:44:59AM -0700, David Mosberger
wli> wrote:
>> What was the original comment relative to? 2.4 or 2.6? In 2.6
>> we lost the PTE quick-list, which I think is where the big
>> overhead came from. Right, Martin?
wli> I don't recall much of the original comment, apart from that
wli> someone said it had too much overhead. I may have presumed too
wli> much when I presumed it was 2.6
OK, I don't think it was me, then.
I do suspect the quick-list would be faster than slab but the
difference is most likely in the noise and you can't argue with the
code-size reduction.
--david
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [RFC] Convert pgtable cache to slab
2004-10-13 18:47 [RFC] Convert pgtable cache to slab Martin K. Petersen
` (14 preceding siblings ...)
2004-10-14 11:00 ` David Mosberger
@ 2004-10-14 11:07 ` Robin Holt
2004-10-14 11:10 ` David Mosberger
16 siblings, 0 replies; 18+ messages in thread
From: Robin Holt @ 2004-10-14 11:07 UTC (permalink / raw)
To: linux-ia64
On Thu, Oct 14, 2004 at 12:44:59AM -0700, David Mosberger wrote:
> >>>>> On Wed, 13 Oct 2004 11:59:56 -0700, William Lee Irwin III <wli@holomorphy.com> said:
>
> William> On Wed, Oct 13, 2004 at 02:47:43PM -0400, Martin
> William> K. Petersen wrote:
> >> This patch makes the page table cache on IA-64 use the slab
> >> instead of standard page allocations. It's based upon Bill
> >> Irwin's code for ppc64. With this patch I got a significant
> >> improvement in page fault time. Standard 2.4.x was about 700ns
> >> on average. Generic 2.6.9rc4 is 3-4 usec, whereas the slabified
> >> pgtcache drops us back down to 600-700 ns. Tested on zx1 and
> >> sn2. The biggest caveat is that I've had to postpone setting up
> >> the gate page until the pgt slab has been initialized. That
> >> wasn't an issue with the existing page-based allocation scheme.
> >> David - how do you prefer I handle this?
>
> William> Nice! I got reports that it would not be beneficial when I
> William> thought about going over this earlier. I suppose it's a
> William> small vindication of my methods to see the original
> William> objection contradicted here. =)
>
> What was the original comment relative to? 2.4 or 2.6? In 2.6 we
> lost the PTE quick-list, which I think is where the big overhead came
> from. Right, Martin?
And the pmd quicklist. We add entries to the pmd quicklist, but never
take them back off. This has a two fold effect in that it causes the
pgd quicklist to be drained unnecessarily when the pmd quicklist has
many unusable entries on it.
Essentially, we were allocating and clearing pages for both pmd and pte
entries every time.
Robin
>
> --david
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [RFC] Convert pgtable cache to slab
2004-10-13 18:47 [RFC] Convert pgtable cache to slab Martin K. Petersen
` (15 preceding siblings ...)
2004-10-14 11:07 ` Robin Holt
@ 2004-10-14 11:10 ` David Mosberger
16 siblings, 0 replies; 18+ messages in thread
From: David Mosberger @ 2004-10-14 11:10 UTC (permalink / raw)
To: linux-ia64
>>>>> On Thu, 14 Oct 2004 06:07:43 -0500, Robin Holt <holt@sgi.com> said:
Robin> Essentially, we were allocating and clearing pages for both
Robin> pmd and pte entries every time.
Yes, you discovered that several months ago, didn't you? Glad the fix
came through, in the end.
--david
^ permalink raw reply [flat|nested] 18+ messages in thread