From: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
To: Doug Ledford <dledford@redhat.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com>,
linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
sfr@canb.auug.org.au
Subject: Re: [Patch 3/4] ipc/mqueue: strengthen checks on mqueue creation
Date: Tue, 01 May 2012 19:04:53 -0400 [thread overview]
Message-ID: <4FA06C15.7000500@gmail.com> (raw)
In-Reply-To: <4FA06BA2.7020703@redhat.com>
(5/1/12 7:02 PM), Doug Ledford wrote:
> On 5/1/2012 4:18 PM, KOSAKI Motohiro wrote:
>>>> But ENOMEM is more inaccurate. It almostly is used for kmalloc failure.
>>>
>>> I chose ENOMEM for that particular error because above there we have
>>> checked the passed in arguments to make sure that they don't violate our
>>> allowances for max message or max message size. If we violate either of
>>> those items, we return EINVAL. In this case, neither of the values is
>>> invalid, it's just that together they make an overly large allocation.
>>> I would see that as more helpful to a programmer than EINVAL when the
>>> values are within the maximums allowed. At least with ENOMEM the
>>> programmer knows they have to reduce their combined message size and
>>> message count in order to get things working.
>>
>> Incorrect. When ENOMEM is returned, programmers can't know
>> which problem was happen 1) kernel has real memory starvation
>> or 2) queue limitation exceed was happen. The problem is, you
>> introduced new overloaded error code for avoiding overload error code.
>> It doesn't make sense. My question was, why can't you choose no
>> overload error code if you want accurate one?
>
> OK, then would EOVERFLOW suit things better?
I have no seen to any confusion source this. thank you.
then, ack all of this series.
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
>
> All this reminds me that when this is taken into Linus' kernel, we need
> to coordinate a man page update for the mq subsystem.
next prev parent reply other threads:[~2012-05-01 23:04 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-01 17:50 [Patch 0/4] ipc/mqueue improvements Doug Ledford
2012-05-01 17:50 ` [Patch 1/4] ipc/mqueue: improve performance of send/recv Doug Ledford
2012-05-01 17:50 ` [Patch 2/4] ipc/mqueue: correct mq_attr_ok test Doug Ledford
2012-05-01 19:34 ` Andrew Morton
2012-05-01 19:38 ` Doug Ledford
2012-05-01 17:50 ` [Patch 3/4] ipc/mqueue: strengthen checks on mqueue creation Doug Ledford
2012-05-01 20:01 ` KOSAKI Motohiro
2012-05-01 20:11 ` Doug Ledford
2012-05-01 20:18 ` KOSAKI Motohiro
2012-05-01 23:02 ` Doug Ledford
2012-05-01 23:04 ` KOSAKI Motohiro [this message]
2012-05-01 23:11 ` Andrew Morton
2012-05-01 17:50 ` [Patch 4/4] tools/selftests: add mq_perf_tests Doug Ledford
2012-05-01 19:53 ` Andrew Morton
2012-05-01 20:14 ` Doug Ledford
2012-05-03 9:21 ` [Patch 1/4] ipc/mqueue: improve performance of send/recv Dan Carpenter
2012-05-03 13:03 ` Doug Ledford
2012-05-03 10:05 ` Nick Piggin
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=4FA06C15.7000500@gmail.com \
--to=kosaki.motohiro@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=dledford@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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