From: Prasanna Meda <pmeda@akamai.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-mm@kvack.org
Subject: Re: [patch] scm: fix scm_fp_list allocation problem
Date: Thu, 02 Jun 2005 17:35:32 -0700 [thread overview]
Message-ID: <429FA5D4.87FD9B6C@akamai.com> (raw)
In-Reply-To: <20050602161341.3d94f17b.akpm@osdl.org>
Andrew Morton wrote:
>
>
> I figure a 32k kmalloc will support an OPEN_MAX of 4095 on 64-bit 4k
> pagesize machines.
>
> Just how high do you want to go?
>
At least 16k, and up to 64k fds.
>
> Given that you need to patch the kernel to support larger SCM_MAX_FD, why
> not add this patch at the same time, keep it out of the main tree?
Can do.
Ideally every fd openable should be passed over. I work towards that goal
and submit again.
>
> > +{
> > + struct scm_fp_list *fpl;
> > + int size = sizeof(struct scm_fp_list);
> > +
> > + if (size <= PAGE_SIZE) {
> > + fpl = (struct scm_fp_list *) kmalloc (size, GFP_KERNEL);
> > + }
> > + else {
> > + fpl = (struct scm_fp_list *) vmalloc (size);
> > + }
>
> - Unneeded braces
>
> - Unneeded typecast
>
> - Unneeded space
>
> - Incorrect `else' indenting.
>
> Should be:
>
> if (size <= PAGE_SIZE)
> fpl = kmalloc(size, GFP_KERNEL);
> else
> fpl = vmalloc(size);
Taken all suggestions.
Thanks,
Prasanna.
--
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>
next prev parent reply other threads:[~2005-06-03 0:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-01 22:27 pmeda
2005-06-02 23:13 ` Andrew Morton
2005-06-03 0:35 ` Prasanna Meda [this message]
2005-06-03 0:53 ` Andrew Morton
2005-06-03 1:23 ` Prasanna Meda
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=429FA5D4.87FD9B6C@akamai.com \
--to=pmeda@akamai.com \
--cc=akpm@osdl.org \
--cc=linux-mm@kvack.org \
/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