From: kanoj@google.engr.sgi.com (Kanoj Sarcar)
To: Timur Tabi <ttabi@interactivesi.com>
Cc: Linux MM mailing list <linux-mm@kvack.org>
Subject: Re: 2.4: why is NR_GFPINDEX so large?
Date: Wed, 21 Jun 2000 14:41:16 -0700 (PDT) [thread overview]
Message-ID: <200006212141.OAA54650@google.engr.sgi.com> (raw)
In-Reply-To: <20000621213507Z131177-21003+34@kanga.kvack.org> from "Timur Tabi" at Jun 21, 2000 04:28:43 PM
>
> ** Reply to message from Kanoj Sarcar <kanoj@google.engr.sgi.com> on Wed, 21
> Jun 2000 14:10:17 -0700 (PDT)
>
>
> > Okay, I will shut up since I will have to pull out old notes and books
> > to convince you, but basically, here's a simple example. Say a L2 cache
> > line is 128 bytes, and each array element is 16 bytes, giving 8 array
> > elements per cache line. Say you decide to eliminate the last element,
> > maybe because it is not used. So, in that space, two global integers/
> > spinlocks etc are packed in after the deletion. Further assume these
> > two integers are frequently updated. Looking at an SMP system that uses
> > the exlusive write cache update protocol, the cache line will probably
> > bounce between the different L2 caches, which is quite bad, assuming
> > that the original 8 element array was readonly, and was probably
> > coresident in all the caches.
>
> Fascinating. I really appreciate your taking the time to explain this to me.
>
> So I suppose the best way to optimize this is to make sure that "NR_GFPINDEX *
> sizeof(zonelist_t)" is a multiple of the cache line size?
>
Which is hard to do with all the various architectures with varying
cache line sizes out there. The asm header files can conveniently use
__attribute__((aligned(128))) etc, but I think the generic header files
use something like __attribute__((__aligned__(SMP_CACHE_BYTES))).
Note that SMP_CACHE_BYTES is equated to the >> L1 << cache size for
most architectures, which probably has a different effect than
aligning on L2 cache lines.
Kanoj
--
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.eu.org/Linux-MM/
next prev parent reply other threads:[~2000-06-21 21:41 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-06-21 19:48 Timur Tabi
2000-06-21 19:56 ` Kanoj Sarcar
2000-06-21 19:57 ` Timur Tabi
2000-06-21 20:23 ` Puppetmaster
2000-06-21 20:37 ` Timur Tabi
2000-06-21 20:37 ` Kanoj Sarcar
2000-06-21 20:41 ` Timur Tabi
2000-06-21 20:49 ` Kanoj Sarcar
2000-06-21 20:59 ` Timur Tabi
2000-06-21 21:10 ` Kanoj Sarcar
2000-06-21 21:28 ` Timur Tabi
2000-06-21 21:41 ` Kanoj Sarcar [this message]
2000-06-21 21:43 ` Timur Tabi
2000-06-22 19:26 ` Andrea Arcangeli
2000-06-22 19:51 ` Jamie Lokier
2000-06-23 17:41 ` Andrea Arcangeli
2000-06-23 17:52 ` Jamie Lokier
2000-06-23 18:02 ` Andrea Arcangeli
2000-06-23 18:03 ` Andrea Arcangeli
2000-06-22 20:22 ` Kanoj Sarcar
2000-06-23 18:11 ` Andrea Arcangeli
2000-06-21 21:22 ` James Manning
2000-06-21 21:24 ` Juan J. Quintela
2000-06-21 21:15 frankeh
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=200006212141.OAA54650@google.engr.sgi.com \
--to=kanoj@google.engr.sgi.com \
--cc=linux-mm@kvack.org \
--cc=ttabi@interactivesi.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