From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0337EC04AB6 for ; Fri, 31 May 2019 15:53:03 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D023726963 for ; Fri, 31 May 2019 15:53:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D023726963 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hWjpp-0005OU-JW; Fri, 31 May 2019 15:52:49 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hWjpo-0005OG-48 for xen-devel@lists.xenproject.org; Fri, 31 May 2019 15:52:48 +0000 X-Inumbo-ID: 21be4d98-83bc-11e9-8ab2-dbabe6b7ec32 Received: from smtp.nue.novell.com (unknown [195.135.221.5]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 21be4d98-83bc-11e9-8ab2-dbabe6b7ec32; Fri, 31 May 2019 15:52:46 +0000 (UTC) Received: from emea4-mta.ukb.novell.com ([10.120.13.87]) by smtp.nue.novell.com with ESMTP (TLS encrypted); Fri, 31 May 2019 17:52:44 +0200 Received: from [192.168.0.36] (nwb-a10-snat.microfocus.com [10.120.13.201]) by emea4-mta.ukb.novell.com with ESMTP (TLS encrypted); Fri, 31 May 2019 16:52:22 +0100 Message-ID: <0c912c719f7fe4fcfcc329f90303b7c985c43c34.camel@suse.com> From: Dario Faggioli To: Juergen Gross , xen-devel@lists.xenproject.org Date: Fri, 31 May 2019 17:52:21 +0200 In-Reply-To: <20190528103313.1343-55-jgross@suse.com> References: <20190528103313.1343-1-jgross@suse.com> <20190528103313.1343-55-jgross@suse.com> Organization: SUSE User-Agent: Evolution 3.32.2 MIME-Version: 1.0 Subject: Re: [Xen-devel] [PATCH 54/60] xen/sched: add minimalistic idle scheduler for free cpus X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Julien Grall , Jan Beulich , Roger Pau =?ISO-8859-1?Q?Monn=E9?= Content-Type: multipart/mixed; boundary="===============5884021104420686429==" Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Message-ID: <20190531155221.cfBZBA4xx0fe3ckRINEaiLN7FlyX0MSLk6AuxMV_RHo@z> --===============5884021104420686429== Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-kNvBcORzXAKwl5qWUjaS" --=-kNvBcORzXAKwl5qWUjaS Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2019-05-28 at 12:33 +0200, Juergen Gross wrote: > Instead of having a full blown scheduler running for the free cpus > add a very minimalistic scheduler for that purpose only ever > scheduling > the related idle vcpu. This has the big advantage of not needing any > per-cpu, per-domain or per-scheduling unit data for free cpus and in > turn simplifying moving cpus to and from cpupools a lot. >=20 > As this new scheduler is not user selectable don't register it as an > official scheduler, but just include it in schedule.c. >=20 > Signed-off-by: Juergen Gross > --- > V1: new patch > --- > --- a/xen/common/schedule.c > +++ b/xen/common/schedule.c > @@ -83,6 +83,57 @@ extern const struct scheduler > *__start_schedulers_array[], *__end_schedulers_arr > =20 > static struct scheduler __read_mostly ops; > =20 > [...] > > +static void * > +sched_idle_alloc_vdata(const struct scheduler *ops, struct > sched_unit *unit, > + void *dd) > +{ > + /* Any non-NULL pointer is fine here. */ > + return (void *)1UL; > +} > + I think the proper thing to do, here, would be to convert alloc_vdata() to PTR_ERR() & IS_ERR(). That's another patch, of course, and given that this series is rather big already, I'm not sure about asking for it to be done in the context of this work. I can do it myself, either right now or after this series is merged (for the sake of not making rebasing 60 patches more complicated than it must be already, for you :-D). Let me know what you think. Regards --=20 Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ ------------------------------------------------------------------- <> (Raistlin Majere) --=-kNvBcORzXAKwl5qWUjaS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEES5ssOj3Vhr0WPnOLFkJ4iaW4c+4FAlzxTbUACgkQFkJ4iaW4 c+4DRQ//doxD5a2Lvp/xjTiWd58ngE0fgSJE8xS2BWfjXZ5zD85kbQ+50Iny2QCj et2yzbDJGQQ7yOOoJua/z/U2jU9cmDS7FNcewg8fJV+FS+F1DoSLLSvqHV1njSW+ l0+FjZx0DIdoIudGFks4MirTQofR9VKP63TTBP8ukvOC8+nyHn5H9e6KB7yMFANh AbDOoPWf64Lbnfa/klDlNwSNqViwzYH10rmATrbqQ/myFvR539ynypEgU9dMtTzX zPm85q9K0fKgbmt05NgE8x7oOuOPFhMKjxyKfnPCUrOmgQBsCF1BHcu/oqB5hiI6 W72IQlb5GgS6uZ5UJHQPj5miCeAs0O63SGoVP0zojE7Ck/gK19jBA6hHtIGXjGcp 7gu+XBJweR/Dr+DnTS8WsOK5lD3VvrzNX9K6DG+bLrZbpXbr7eo/fWM9xAdOVIXx rO9HErKh/udQzuiepi3BAayVdErAJd0T6/VPDmCgg/hQcskyVVc3ifAauzgdos6d OfZsYQjGYWlk8D0u8x0Qal87mDMML+wyNOjkW1Aepd7SnVH1xUJfY67fx1itg7is PJLiouFwXZoiaLx3PE9Zkd1paxGc3z1zWlgnFU2KFM8ULFBQov8TAZ2cKj5ZcZVo 7ovjgDETn15SQmy899mYlVvJIQl0qlpROvJS9FjilVDFfOjDeo8= =hiT5 -----END PGP SIGNATURE----- --=-kNvBcORzXAKwl5qWUjaS-- --===============5884021104420686429== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcKaHR0cHM6Ly9saXN0 cy54ZW5wcm9qZWN0Lm9yZy9tYWlsbWFuL2xpc3RpbmZvL3hlbi1kZXZlbA== --===============5884021104420686429==--