From: Dmitry Torokhov <dtor@vmware.com>
To: David Rientjes <rientjes@google.com>
Cc: Rakib Mullick <rakib.mullick@gmail.com>,
"linux-kernel" <linux-kernel@vger.kernel.org>,
akpm@linux-foundation.org
Subject: Re: [PATCH] drivers, vmw_balloon.c: Increment alloc and sleep_alloc only when page allocation succeeds.
Date: Mon, 17 Oct 2011 12:45:30 -0700 [thread overview]
Message-ID: <201110171245.31256.dtor@vmware.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1110171232460.12560@chino.kir.corp.google.com>
On Monday, October 17, 2011 12:35:34 PM David Rientjes wrote:
> On Tue, 18 Oct 2011, Rakib Mullick wrote:
> > While doing allocation statistics in vmballoon_reserve_page function,
> >
> > alloc and sleep_alloc has been incremented even if allocation fails.
> > But,
> > b->stats.alloc and b->stats.sleep_alloc supposed to increment only
> > when they succeed. This patch makes sure that, alloc and sleep_alloc
> > gets incremented when page allocation succeeds.
>
> Dmitry could say for sure, but this seems to actually change the
> semantics. If the allocations fail, it increments alloc_fail and
> sleep_alloc_fail accordingly so you could easily see 10 alloc and 5
> alloc_fail. With your patch, it would be 5 alloc and 5 alloc_fail.
>
> I don't know which one is best, but I would opt to stay with the
> semantics that alloc and sleep_alloc have already had rather than
> changing them.
Right, b->stats.alloc and b->stats.sleep_alloc show number of allocation
attempts and alloc_fail and sleep_alloc_fail show how many of these
attempts failed. This behavior matches behavior of the driver we have
been shipping out of the tree for many years and I would prefer to keep
it as is.
Thanks,
Dmitry
next prev parent reply other threads:[~2011-10-17 19:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-17 18:57 [PATCH] drivers, vmw_balloon.c: Increment alloc and sleep_alloc only when page allocation succeeds Rakib Mullick
2011-10-17 19:35 ` David Rientjes
2011-10-17 19:45 ` Dmitry Torokhov [this message]
2011-10-17 20:17 ` Rakib Mullick
2011-10-17 20:25 ` Dmitry Torokhov
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=201110171245.31256.dtor@vmware.com \
--to=dtor@vmware.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rakib.mullick@gmail.com \
--cc=rientjes@google.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.