From owner-freebsd-hackers@freebsd.org Mon Jan 28 11:37:49 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7EC514B0318 for ; Mon, 28 Jan 2019 11:37:49 +0000 (UTC) (envelope-from xi@borderworlds.dk) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7307387224; Mon, 28 Jan 2019 11:37:47 +0000 (UTC) (envelope-from xi@borderworlds.dk) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 9CF1E20964; Mon, 28 Jan 2019 06:37:46 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 28 Jan 2019 06:37:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=borderworlds.dk; h=subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=b nhkFbbVCIP4jgNCjMpdOl8Ef2YDeZC0R5HIeJnHNwA=; b=whqGspxhbTTwcGjbo Z6HRrd3AKiqXbLxRxLpBaxHaYG65tIKdkqu3N+/Sdz6He/bgEmn0OS4NfVPQzOYj x5QpwyeuxZio9rNJehoQ2aV4DgzJlnvSRg+LErq9WyZsIusoeDk5AItpN1sNhJR2 uc37yQxfHTxQ6KIT8t6x2lttN1VFDsRf2GS6oUhzuAPaLT57wqxZxyZ8C2CbXjiE 8AAFm9fBPGfz6aydBKgnrZzJQznKp9ZkrMzWJE2SmeQ5Wdm98dtsit74sdYfUWyw 0jP6a3XOsv2VMy1Ms3EpxY76hAo8q8c2YAiwJNiFYa9Am7JTYcolQZJRs1z2Qh/C 3Ns9g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=bnhkFbbVCIP4jgNCjMpdOl8Ef2YDeZC0R5HIeJnHN wA=; b=QKKBnt7gDibV6/RcbKZ7BmPeIUG8DmxX/b0f68w0eLo2jh66UY8BH2/JM 6LJuTDB3EcGj8qj3/JXGMfN7p2+9jELOiLZjVsyn5a4K4t/Zfg8CCpK/7c0X8Ixi h+hPohN5eBXAuHWYyG+s/QSXPL+duN+aUG9blxMyJWTNCZP5tdVjERInW70bsg1s A4txX6J29KqloVyJGuh98vnpw7U9PfgWDdS95mQAWT8Qgxu2DdBP7dHiHEz8s6WQ 5PReQvs0LPZgwAIidYikAZu2Pzx3ZZkvypnX1bWybjADZYJBvuVN8tjiCZR5vON9 /CenOvgqVCqhmsFOgHdtaV7cbTefA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrjedtgdeffecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecufedt tdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepuffvfhfhohfkff gfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpeevhhhrihhsthhirghnpgfuthoorhhk uceogihisegsohhruggvrhifohhrlhgushdrughkqeenucfkphepkeehrdduledurdduvd dvrddvuddtnecurfgrrhgrmhepmhgrihhlfhhrohhmpeigihessghorhguvghrfihorhhl ughsrdgukhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from borg.borderworlds.dk (unknown [85.191.122.210]) by mail.messagingengine.com (Postfix) with ESMTPA id 3FBEF100BB; Mon, 28 Jan 2019 06:37:45 -0500 (EST) Subject: Re: CPU Isolation To: Poul-Henning Kamp , Babak Farrokhi Cc: FreeBSD Hackers , Mark Saad References: <64099.1548664473@critter.freebsd.dk> From: =?UTF-8?Q?Christian_St=c3=a6rk?= Organization: The Border Worlds Message-ID: <011a4a81-1cca-d97e-a355-9f2e8ff8b5c6@borderworlds.dk> Date: Mon, 28 Jan 2019 12:37:44 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <64099.1548664473@critter.freebsd.dk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: da X-Rspamd-Queue-Id: 7307387224 X-Spamd-Bar: ------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=borderworlds.dk header.s=fm1 header.b=whqGspxh; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=QKKBnt7g; spf=pass (mx1.freebsd.org: domain of xi@borderworlds.dk designates 66.111.4.29 as permitted sender) smtp.mailfrom=xi@borderworlds.dk X-Spamd-Result: default: False [-7.01 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[borderworlds.dk:s=fm1,messagingengine.com:s=fm1]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.29]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[borderworlds.dk]; HAS_ORG_HEADER(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[borderworlds.dk:+,messagingengine.com:+]; MX_GOOD(-0.01)[in2-smtp.messagingengine.com,in1-smtp.messagingengine.com,in2-smtp.messagingengine.com,in1-smtp.messagingengine.com,in2-smtp.messagingengine.com,in1-smtp.messagingengine.com,in2-smtp.messagingengine.com,in1-smtp.messagingengine.com]; NEURAL_HAM_SHORT(-0.77)[-0.774,0]; IP_SCORE(-3.63)[ip: (-9.71), ipnet: 66.111.4.0/24(-4.70), asn: 11403(-3.64), country: US(-0.08)]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:11403, ipnet:66.111.4.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[29.4.111.66.list.dnswl.org : 127.0.5.1] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jan 2019 11:37:50 -0000 On 1/28/19 9:34 AM, Poul-Henning Kamp wrote: > -------- > In message , "Babak Farrokhi" writes: > >> AFAIK there is no way to do it pre-boot. To do the isolation post-boot your >> best bet is cpuset(1) (with which I could not totally isolate cpu cores >> as dedicated application cores). > The trick is to move /sbin/init to /sbin/init.real and create a > /sbin/init shell script which cpuset's PID=1 then exec's /sbin/init.real > > Be aware that the surroundings of that shell script are very sparse. > Or maybe set "init_path" in loader.conf to point to the init wrapper and then keep /sbin/init unchanged. Then subsequent system updates would not break the setup. Best regards Christian