All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ian Campbell <Ian.Campbell@eu.citrix.com>
Cc: xen-devel@lists.xensource.com, Fantu <fantonifabio@tiscali.it>,
	"Xu, Dongxiao" <dongxiao.xu@intel.com>,
	Paul Durrant <paul.durrant@citrix.com>,
	djmagee@mageenet.net
Subject: Re: [PV-ops][PATCH] Netback: Fix PV network issue for netback multiple threads patchset
Date: Thu, 01 Jul 2010 17:29:07 +0200	[thread overview]
Message-ID: <4C2CB443.1060907@goop.org> (raw)
In-Reply-To: <1277995730.28432.24.camel@zakaz.uk.xensource.com>

On 07/01/2010 04:48 PM, Ian Campbell wrote:
> On Mon, 2010-06-21 at 12:14 +0100, Jeremy Fitzhardinge wrote:
>   
>> Subject: [PATCH] xen/netback: make sure all the group structures are initialized before starting async code
>>
>> Split the netbk group array initialization into two phases: one to do
>> simple "can't fail" initialization of lists, timers, locks, etc; and a
>> second pass to allocate memory and start the async code.
>>
>> This makes sure that all the basic stuff is in place by the time the async code
>> is running.
>>     
> Paul noticed a crash in netback init because...
>
>   
>> @@ -1764,16 +1766,6 @@ static int __init netback_init(void)
>>  		netbk->netbk_tx_pending_timer.function =
>>  			netbk_tx_pending_timeout;
>>  
>> -		netbk->mmap_pages =
>> -			alloc_empty_pages_and_pagevec(MAX_PENDING_REQS);
>> -		if (!netbk->mmap_pages) {
>> -			printk(KERN_ALERT "%s: out of memory\n", __func__);
>> -			del_timer(&netbk->netbk_tx_pending_timer);
>> -			del_timer(&netbk->net_timer);
>> -			rc = -ENOMEM;
>> -			goto failed_init;
>> -		}
>> -
>>  		for (i = 0; i < MAX_PENDING_REQS; i++) {
>>  			page = netbk->mmap_pages[i];
>>  			SetPageForeign(page, netif_page_release);
>>     
> ...this dereference of netbk->mmap_pages[i]...
>
>   
>> @@ -1786,6 +1778,26 @@ static int __init netback_init(void)
>>     
> [...]
>   
>> +		netbk->mmap_pages =
>> +			alloc_empty_pages_and_pagevec(MAX_PENDING_REQS);
>>     
> ... happens before this initialisation of the array.
>   

Hm, I hadn't meant to commit that properly.  I had it locally and
accidentally pushed it out.

I only did that patch as an RFC in response to an issue alluded to by
Dongxiao (or was it you?) about things not being fully initialized by
the time the async code starts.  Is this a real issue, and if so, what's
the correct fix?

Thanks,
    J

  reply	other threads:[~2010-07-01 15:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-10 11:48 [PV-ops][PATCH] Netback: Fix PV network issue for netback multiple threads patchset Xu, Dongxiao
2010-06-10 12:29 ` Jan Beulich
2010-06-10 12:51 ` [PV-ops][PATCH] Netback: Fix PV network issue fornetback " djmagee
2010-06-10 12:58   ` Pasi Kärkkäinen
2010-06-11  9:35 ` [PV-ops][PATCH] Netback: Fix PV network issue for netback " Ian Campbell
2010-06-17  8:16   ` Xu, Dongxiao
2010-06-21 11:14     ` Jeremy Fitzhardinge
2010-06-22  2:29       ` Xu, Dongxiao
2010-07-01 14:48       ` Ian Campbell
2010-07-01 15:29         ` Jeremy Fitzhardinge [this message]
2010-07-01 15:47           ` Ian Campbell
2010-07-01 16:06             ` Ian Campbell
2010-07-01 16:07             ` Jeremy Fitzhardinge
2010-07-01 16:11               ` Ian Campbell
2010-06-24  8:33     ` Ian Campbell
2010-06-25  7:31       ` Xu, Dongxiao

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=4C2CB443.1060907@goop.org \
    --to=jeremy@goop.org \
    --cc=Ian.Campbell@eu.citrix.com \
    --cc=djmagee@mageenet.net \
    --cc=dongxiao.xu@intel.com \
    --cc=fantonifabio@tiscali.it \
    --cc=paul.durrant@citrix.com \
    --cc=xen-devel@lists.xensource.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.