xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Keir Fraser <keir@xen.org>
To: Jan Beulich <JBeulich@suse.com>, andres@lagarcavilla.org
Cc: Dan Magenheimer <dan.magenheimer@oracle.com>,
	ian.campbell@citrix.com, andres@gridcentric.ca, tim@xen.org,
	xen-devel <xen-devel@lists.xen.org>,
	ian.jackson@citrix.com, adin@gridcentric.ca
Subject: Re: [PATCH] Low mem virq incremental adjustments
Date: Fri, 09 Mar 2012 09:56:08 +0000	[thread overview]
Message-ID: <CB7F8438.3B2BE%keir@xen.org> (raw)
In-Reply-To: <4F59D5B302000078000774F6@nat28.tlf.novell.com>

On 09/03/2012 09:04, "Jan Beulich" <JBeulich@suse.com> wrote:

>>>> On 08.03.12 at 22:59, Dan Magenheimer <dan.magenheimer@oracle.com> wrote:
>>>  From: Andres Lagar-Cavilla [mailto:andres@lagarcavilla.org]
>>> Sent: Wednesday, March 07, 2012 11:12 AM
>>> To: Jan Beulich
>>> Cc: Dan Magenheimer; ian.campbell@citrix.com; ian.jackson@citrix.com;
>> adin@gridcentric.ca;
>>> andres@gridcentric.ca; xen-devel; tim@xen.org
>>> Subject: Re: [PATCH] Low mem virq incremental adjustments
>>> 
>>>>>>> On 07.03.12 at 17:15, Andres Lagar-Cavilla <andres@lagarcavilla.org>
>>>> wrote:
>>>>> --- a/xen/common/page_alloc.c
>>>>> +++ b/xen/common/page_alloc.c
>>>>> @@ -377,7 +377,10 @@ static void __init setup_low_mem_virq(vo
>>>>> 
>>>>>  static void check_low_mem_virq(void)
>>>>>  {
>>>>> -    if ( unlikely(total_avail_pages <= low_mem_virq_th) )
>>>>> +    unsigned long avail_pages = total_avail_pages +
>>>>> +                (opt_tmem) ? tmem_freeable_pages(): 0;
>>>> 
>>>> Can tmem_freeable_pages() return anything other than zero when
>>>> opt_tmem is zero? (I.e. is the [improperly parenthesized!] conditional
>>>> expression necessary at all?)
>>> 
>>> I'm not sure. I'll let Dan take it from here, as he surely knows the right
>>> way. He acked it the way it is.
>>> Andres
>> 
>> Both would be correct (other than the parentheses).
>> 
>> I was also going to make the same comment about tmem_freeable_pages()
>> but decided the way Andres coded it is clearer because it doesn't
>> assume anything about tmem; if tmem is enabled, it uses an
>> abstract interface this code doesn't need to know anything about.
>> 
>> Anyway, either way is fine with me.
> 
> So I take it that you'll be submitting a fix at least for the parentheses
> issue.

Ugh, I checked it in removing the unnecessary parentheses, but didn't add
the required ones around the ternary operator. I'll fix that now.

 -- Keir

> Jan
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

      reply	other threads:[~2012-03-09  9:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-07 16:15 [PATCH] Low mem virq incremental adjustments Andres Lagar-Cavilla
2012-03-07 17:02 ` Jan Beulich
2012-03-07 18:12   ` Andres Lagar-Cavilla
2012-03-08 21:59     ` Dan Magenheimer
2012-03-09  9:04       ` Jan Beulich
2012-03-09  9:56         ` Keir Fraser [this message]

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=CB7F8438.3B2BE%keir@xen.org \
    --to=keir@xen.org \
    --cc=JBeulich@suse.com \
    --cc=adin@gridcentric.ca \
    --cc=andres@gridcentric.ca \
    --cc=andres@lagarcavilla.org \
    --cc=dan.magenheimer@oracle.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.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).