[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xen/sched: remove wrong assertions in csched2_free_pdata()


  • To: Juergen Gross <JGross@xxxxxxxx>
  • From: George Dunlap <George.Dunlap@xxxxxxxxxx>
  • Date: Tue, 12 Nov 2019 15:52:42 +0000
  • Accept-language: en-GB, en-US
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=George.Dunlap@xxxxxxxxxx; spf=Pass smtp.mailfrom=George.Dunlap@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>
  • Delivery-date: Tue, 12 Nov 2019 15:52:52 +0000
  • Ironport-sdr: 8GeMciMUtfNVfNvIiZQhjvfacdduUNpTqsxuL798omcYH8n9gWf891pmcZgE4bs2rFcX/fbjNf HiSA2e+JjuWEzUvKRTyLwl1gK3etnAYDwwBI8jETReaHpU5+3/8G1uK6fNLAZdwVERksB/bl63 1NQ1Hv9m2LXBGNRvNczW/4/mpK3GRhLaRWFGrWPReamOm5Uj164WR273zdX3ClNAoA+Ip0Ty+o tI6ZXZ6Prn4qGpcQCGbHcCzckDahzVWAEtmuRSeyMDY27BOYlkW/8tw9oig4+DhDkuQvswvWhP 200=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVlgeMgOer/S1O/EqNSzzHmmw/rKeHpZwA
  • Thread-topic: [PATCH] xen/sched: remove wrong assertions in csched2_free_pdata()


> On Nov 8, 2019, at 7:38 AM, Juergen Gross <JGross@xxxxxxxx> wrote:
> 
> The assertions in csched2_free_pdata() are wrong as in case it is
> called by schedule_cpu_add() after a failure of sched_alloc_udata()
> the init pdata function won't have been called.

I’m a bit confused by this, as the comment says that the ASSERT()s should be OK 
with that case; i.e., that they should check *either* that pdata hasn’t been 
called, or that dinit_pdata() has been called:

> -     * xfree() does not really mind, but we want to be sure that either
> -     * init_pdata has never been called, or deinit_pdata has been called
> -     * already.

So which of the following conditions will fail if sched_alloc_udata() fails?  
It looks to me like they should both be fine.

> -    ASSERT(!pcpu || spc->runq_id == -1);
> -    ASSERT(!cpumask_test_cpu(cpu, &csched2_priv(ops)->initialized));

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.