From: "Michael S. Tsirkin" <firstname.lastname@example.org> To: Avi Kivity <email@example.com> Cc: Sasha Levin <firstname.lastname@example.org>, email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org Subject: Re: [PATCH v3 2/2] virtio-ring: Allocate indirect buffers from cache when possible Date: Tue, 4 Sep 2012 21:41:22 +0300 [thread overview] Message-ID: <20120904184122.GA3602@redhat.com> (raw) In-Reply-To: <50462D8B.email@example.com> On Tue, Sep 04, 2012 at 07:34:19PM +0300, Avi Kivity wrote: > On 08/31/2012 12:56 PM, Michael S. Tsirkin wrote: > > On Fri, Aug 31, 2012 at 11:36:07AM +0200, Sasha Levin wrote: > >> On 08/30/2012 03:38 PM, Michael S. Tsirkin wrote: > >> >> +static unsigned int indirect_alloc_thresh = 16; > >> > Why 16? Please make is MAX_SG + 1 this makes some sense. > >> > >> Wouldn't MAX_SG mean we always allocate from the cache? Isn't the memory waste > >> too big in this case? > > > > Sorry. I really meant MAX_SKB_FRAGS + 1. MAX_SKB_FRAGS is 17 so gets us > > threshold of 18. It is less than the size of an skb+shinfo itself so - > > does it look too big to you? Also why do you think 16 is not too big but > > 18 is? If there's a reason then I am fine with 16 too but then please > > put it in code comment near where the value is set. > > > > Yes this means virtio net always allocates from cache > > but this is a good thing, isn't it? Gets us more consistent > > performance. > > kmalloc() also goes to a cache. Is there a measurable difference? Yes see 0/2 and followup discussion. > Ugh, there's an ugly loop in __find_general_cachep(), which really wants > to be replaced with fls(). > > -- > error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2012-09-04 18:40 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-08-30 11:21 [PATCH v3 1/2] virtio-ring: Use threshold for switching to indirect descriptors Sasha Levin 2012-08-30 11:21 ` [PATCH v3 2/2] virtio-ring: Allocate indirect buffers from cache when possible Sasha Levin 2012-08-30 13:38 ` Michael S. Tsirkin 2012-08-31 9:36 ` Sasha Levin 2012-08-31 9:56 ` Michael S. Tsirkin 2012-09-04 16:34 ` Avi Kivity 2012-09-04 16:36 ` Avi Kivity 2012-09-04 18:41 ` Michael S. Tsirkin [this message] 2012-09-05 14:21 ` Avi Kivity 2012-09-05 14:27 ` Michael S. Tsirkin 2012-08-30 14:14 ` [PATCH v3 1/2] virtio-ring: Use threshold for switching to indirect descriptors Michael S. Tsirkin
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=20120904184122.GA3602@redhat.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: [PATCH v3 2/2] virtio-ring: Allocate indirect buffers from cache when possible' \ /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
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).