From: "J. Bruce Fields" <bfields@redhat.com>
To: linux-nfs@vger.kernel.org
Cc: "J. Bruce Fields" <bfields@redhat.com>
Subject: [PATCH 2/2] nfsd: fix default iosize calculation on 32bit
Date: Mon, 30 Jan 2012 17:42:45 -0500 [thread overview]
Message-ID: <1327963365-2921-2-git-send-email-bfields@redhat.com> (raw)
In-Reply-To: <1327963365-2921-1-git-send-email-bfields@redhat.com>
From: "J. Bruce Fields" <bfields@redhat.com>
The rpc buffers will be allocated out of low memory, so we should really
only be taking that into account.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---
fs/nfsd/nfssvc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index 2ad5ffe..53c89f7 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -314,7 +314,7 @@ static int nfsd_get_default_max_blksize(void)
unsigned long bytes;
si_meminfo(&i);
- target = i.totalram << PAGE_SHIFT;
+ target = (i.totalram - i.totalhigh) << PAGE_SHIFT;
/*
* Aim for 1/4096 of memory per thread This gives 1MB on 4Gig
* machines, but only uses 32K on 128M machines. Bottom out at
--
1.7.5.4
next prev parent reply other threads:[~2012-01-30 22:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-30 22:42 [PATCH 1/2] nfsd: cleanup setting of default max_block_size J. Bruce Fields
2012-01-30 22:42 ` J. Bruce Fields [this message]
2012-01-30 22:47 ` [PATCH 2/2] nfsd: fix default iosize calculation on 32bit J. Bruce Fields
2012-01-31 1:11 ` [PATCH 1/2] nfsd: cleanup setting of default max_block_size Mi Jinlong
2012-02-01 21:46 ` J. Bruce Fields
2012-02-03 20:49 ` J. Bruce Fields
2012-02-03 16:24 ` Mi Jinlong
2012-02-04 2:16 ` J. Bruce Fields
2012-02-04 12:14 ` Mi Jinlong
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=1327963365-2921-2-git-send-email-bfields@redhat.com \
--to=bfields@redhat.com \
--cc=linux-nfs@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).