From: Roland Dreier <rdreier@cisco.com>
To: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: Avi Kivity <avi@argo.co.il>, kvm-devel <kvm@vger.kernel.org>,
Anthony Liguori <aliguori@us.ibm.com>
Subject: Re: [RFC][PATCH] reduce KVM stack usage
Date: Thu, 17 Jul 2008 16:02:10 -0700 [thread overview]
Message-ID: <adavdz46rnx.fsf@cisco.com> (raw)
In-Reply-To: <1216315391.9311.3.camel@nimitz> (Dave Hansen's message of "Thu, 17 Jul 2008 10:23:11 -0700")
> > > + kmalloc(GFP_KERNEL, sizeof(struct kvm_pv_mmu_op_buffer));
> > Surely this produces a warning? kmalloc takes (size, flags) -- you have
> > them reversed here.
> Heh. It actually doesn't.
Yeah, I guess you need sparse to catch the gfp_t mismatch.
> > kfree(NULL) is fine, so you can remove the if()s here.
> I know it is fine, but I kinda like putting the if()s, just to let
> people know that we don't always *expect* something to be in there.
> But, it doesn't matter to me too much either way.
It's not really a big deal, but "if (x) kfree(x);" does bloat the object
code with the extra test of 'x'. I guess you could put a comment like
/* free any temp structures we allocated */ or something like that.
- R.
next prev parent reply other threads:[~2008-07-17 23:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-17 15:32 [RFC][PATCH] reduce KVM stack usage Dave Hansen
2008-07-17 15:40 ` Roland Dreier
2008-07-17 17:23 ` Dave Hansen
2008-07-17 23:02 ` Roland Dreier [this message]
2008-07-19 7:32 ` Avi Kivity
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=adavdz46rnx.fsf@cisco.com \
--to=rdreier@cisco.com \
--cc=aliguori@us.ibm.com \
--cc=avi@argo.co.il \
--cc=dave@linux.vnet.ibm.com \
--cc=kvm@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