From: "Bryan Wu" <cooloney@kernel.org>
To: "Al Viro" <viro@zeniv.linux.org.uk>
Cc: torvalds@linux-foundation.org, akpm@linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] [vfs/proc] task_nommu: fix compile failing bug because of spilt file.h
Date: Mon, 5 May 2008 01:25:37 +0800 [thread overview]
Message-ID: <386072610805041025w7120539fp1f8efb86e20da5b4@mail.gmail.com> (raw)
In-Reply-To: <20080504153056.GJ5882@ZenIV.linux.org.uk>
On Sun, May 4, 2008 at 11:30 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> On Sun, May 04, 2008 at 11:12:55PM +0800, Bryan Wu wrote:
> > diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
> > index 6cba820..987bc69 100644
> > --- a/fs/proc/task_nommu.c
> > +++ b/fs/proc/task_nommu.c
> > @@ -1,6 +1,7 @@
> >
> > #include <linux/mm.h>
> > #include <linux/file.h>
> > +#include <linux/fdtable.h>
> > #include <linux/mount.h>
> > #include <linux/ptrace.h>
> > #include <linux/seq_file.h>
>
> Well... I see what it's trying to do, but it's a bullshit. Look: it's from
> if (current->files && atomic_read(¤t->files->count) > 1)
> sbytes += kobjsize(current->files);
> else
> bytes += kobjsize(current->files);
> Now, what we really have is size of current->files (fixed and not too large)
> + if descriptor table is too large to be embedded,
> size of current->files->fdt
> size of current->files->fdt->fd
> size of current->files->fdt->open_fds/->close_on_exec
> And the second term there can be *large*, so if we are really serious about
> taking descriptor table footprint into account, we'd better take care of
> that too. I'm not sure that we want to, though - note that we do that only
> on nommu targets...
>
> So what's that code really trying to achieve?
>
Wow, my patch is just to kill the compile error, I did not notice this
large size issue here.
I'd like to improve this code later.
Thanks
-Bryan
next prev parent reply other threads:[~2008-05-04 17:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-04 15:12 Bryan Wu
2008-05-04 15:30 ` Al Viro
2008-05-04 17:25 ` Bryan Wu [this message]
2008-05-04 17:33 ` Al Viro
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=386072610805041025w7120539fp1f8efb86e20da5b4@mail.gmail.com \
--to=cooloney@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®