From: Zeshan Ahmad <zeshan_uet@yahoo.com>
To: Mark Hemment <markhe@veritas.com>
Cc: tigran@veritas.com, linux-mm@kvack.org
Subject: Re: stack overflow
Date: Wed, 6 Sep 2000 06:25:03 -0700 (PDT) [thread overview]
Message-ID: <20000906132503.8101.qmail@web6405.mail.yahoo.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1806 bytes --]
Thanx for ur reply in considering my problem. I am
using Kernel version 2.2.14
I have attached the portion of mm/slab.c containing
the function kmem_cache_sizes_init from the kernel
code i am using with this mail. Plz have a look at it
and recommend me any changes.
Also plz suggest any good readings about "slab
allocator" on the net.
Thanx for ur support. Help is badly needed.
Anxiously waiting for ur reply.
Regards
ZESHAN
--- Mark Hemment <markhe@veritas.com> wrote:
> Hi Zeshan,
>
> What version of 2.2.x are you using, and have you
> applied any patches it
> to?
> I'm not subscribed to linux-mm at the moment, so I
> missed your original
> posting.
>
> Mark
>
>
> On Tue, 5 Sep 2000, Zeshan Ahmad wrote:
>
> > Hi
> >
> > I have figured out why the patch is'nt working.
> >
> > Mark wrote:
> > >In my original, the code assumes that all general
> > >purpose slabs below
> > >"bufctl_limit" where suitable for bufctl
> allocation
> > >(look at a 2.2.x
> > >version, in kmem_cache_sizes_init() I have a
> state
> > >variable called
> > >"found").
> >
> > Since I am already using 2.2.x, so the patch is
> not
> > working. This means i am already using the
> variable
> > "found".
> > So this will not work i presume.
> >
> > Any other solution available?
> >
> > Regards
> > Zeshan
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Mail - Free email you can access from
> anywhere!
> > http://mail.yahoo.com/
> >
>
> --
> 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/
__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/
[-- Attachment #2: kmem_cache_sizes_init.txt --]
[-- Type: text/plain, Size: 1191 bytes --]
void __init kmem_cache_sizes_init(void)
{
unsigned int found = 0;
cache_slabp = kmem_cache_create("slab_cache", sizeof(kmem_slab_t),
0, SLAB_HWCACHE_ALIGN, NULL, NULL);
if (cache_slabp) {
char **names = cache_sizes_name;
cache_sizes_t *sizes = cache_sizes;
do {
/* For performance, all the general caches are L1 aligned.
* This should be particularly beneficial on SMP boxes, as it
* eliminates "false sharing".
* Note for systems short on memory removing the alignment will
* allow tighter packing of the smaller caches. */
if (!(sizes->cs_cachep =
kmem_cache_create(*names++, sizes->cs_size,
0, SLAB_HWCACHE_ALIGN, NULL, NULL)))
goto panic_time;
if (!found) {
/* Inc off-slab bufctl limit until the ceiling is hit. */
if (SLAB_BUFCTL(sizes->cs_cachep->c_flags))
found++;
else
bufctl_limit =
(sizes->cs_size/sizeof(kmem_bufctl_t));
}
sizes->cs_cachep->c_flags |= SLAB_CFLGS_GENERAL;
sizes++;
} while (sizes->cs_size);
#if SLAB_SELFTEST
kmem_self_test();
#endif /* SLAB_SELFTEST */
return;
}
panic_time:
panic("kmem_cache_sizes_init: Error creating caches");
/* NOTREACHED */
}
next reply other threads:[~2000-09-06 13:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-09-06 13:25 Zeshan Ahmad [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-09-05 19:03 stack overflow Zeshan Ahmad
2000-09-06 8:33 ` Mark Hemment
2000-09-04 10:47 Zeshan Ahmad
2000-09-04 11:03 ` Matti Aarnio
2000-09-04 11:23 ` Tigran Aivazian
2000-09-05 10:55 ` Mark Hemment
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=20000906132503.8101.qmail@web6405.mail.yahoo.com \
--to=zeshan_uet@yahoo.com \
--cc=linux-mm@kvack.org \
--cc=markhe@veritas.com \
--cc=tigran@veritas.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