From: Dave Hansen <dave.hansen@intel.com>
To: Jerome Marchand <jmarchan@redhat.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mm: add overcommit_kbytes sysctl variable
Date: Wed, 21 Aug 2013 09:23:07 -0700 [thread overview]
Message-ID: <5214E96B.3090009@intel.com> (raw)
In-Reply-To: <5214DB1B.6070803@redhat.com>
On 08/21/2013 08:22 AM, Jerome Marchand wrote:
>> > Instead of introducing yet another tunable, why don't we just make the
>> > ratio that comes in from the user more fine-grained?
>> >
>> > sysctl overcommit_ratio=0.2
>> >
>> > We change the internal 'sysctl_overcommit_ratio' to store tenths or
>> > hundreths of a percent (or whatever), then parse the input as two
>> > integers. I don't think we need fully correct floating point parsing
>> > and rounding here, so it shouldn't be too much of a chore. It'd
>> > probably end up being less code than you have as it stands.
>> >
> Now that I think about it, that could break user space. Sure write access
> wouldn't be a problem (one can still write a plain integer), but a script
> that reads a fractional value when it expects an integer might not be able
> to cope with it.
You're right. Something doing FOO=$(cat overcommit_ratio) and then
trying do do arithmetic would just fail loudly. But, it would probably
fail silently if we create another tunable that all of a sudden returns
0 (when the kernel is not _behaving_ like it is set to 0).
I'm not sure there's a good way out of this without breakage (or at
least confusing) of _some_ old scripts/programs. Either way has ups and
downs.
The existing dirty_ratio/bytes stuff just annoys me because I end up
having to check two places whenever I go looking for it.
--
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:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2013-08-21 16:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 15:17 [PATCH 1/2] mm: factor commit limit calculation Jerome Marchand
2013-08-19 15:17 ` [PATCH 2/2] mm: add overcommit_kbytes sysctl variable Jerome Marchand
2013-08-19 16:55 ` Dave Hansen
2013-08-20 8:58 ` Jerome Marchand
2013-08-21 15:22 ` Jerome Marchand
2013-08-21 16:23 ` Dave Hansen [this message]
2013-08-22 9:25 ` Jerome Marchand
2013-09-05 12:51 ` [PATCH 2/2 v2] mm: allow to set overcommit ratio more precisely Jerome Marchand
2013-09-05 14:41 ` Dave Hansen
2013-09-05 14:47 ` Jerome Marchand
2013-09-05 22:11 ` Pavel Machek
2013-09-06 8:38 ` Jerome Marchand
2013-09-06 14:11 ` [PATCH 2/2 v3] " Jerome Marchand
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=5214E96B.3090009@intel.com \
--to=dave.hansen@intel.com \
--cc=jmarchan@redhat.com \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).