From owner-freebsd-hackers@freebsd.org Mon Jan 28 19:25:22 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 A2CE314BCB66 for ; Mon, 28 Jan 2019 19:25:22 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8EBD674297 for ; Mon, 28 Jan 2019 19:25:21 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: by mail-ed1-x543.google.com with SMTP id f9so13987968eds.10 for ; Mon, 28 Jan 2019 11:25:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=longcount-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1Poj7Exj+acblKqgUccbF/ihSWkn7r9uVtsN4m/jj6o=; b=BLauJtP4pVn2q4+5I0GQyzge3FerYGBHYE8WtPNMxumHMgb4O9FPlqcLZtj2Z3zOvf 3Zq9aINr8xD8drwZOQtLeQUjcW9IU5/YgiS3p2TKxpJ9E8+y0AsmRj5tZ/+2HZjS2b7x YTHeLE5alQrt/FuW63BEbT4sbV6HpnXuiroCKayVTEFIBkIhe+iriuZDcrGJlYyMIi35 LE3guQZkuIjxAMXQHCSYTfpD4n01xIdZcN41mWixwf3cDv8QSyH7IGW3dSX/pXB967MI skAr5EnhC+GMbO1ZtHM4e+w2gq8yf6d0cvNDZit3j83Xz5REYq/onfGr12+Zk7A/19tM IvKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1Poj7Exj+acblKqgUccbF/ihSWkn7r9uVtsN4m/jj6o=; b=mzspQn3mxuDbWEAM8nxNkz8hzwmq909cjd/nKPXWZtvy7il6FwlWVCG+bqbDPAKxYZ A7nWN7NS30VXFqSRVfJHNJzWZQhfrd81lbp51amOi5/G2viuH+ACt6NiiJR8KbAygRua zzCkF1xDxuEuFmZ6kecddGwL7TpWgkDLaZ7w7iIXVp/FELTKXRQnsVslQ9gch7d9KAi6 gp6HcFz8GlL/QgjwrTsNFjC+lxIRw3JCgFB3vtrnG1GsljNvidvAcCQcJB3XmZ1KQGYy PBgPqrz/xOrhlm5bpUm142xCyGA64ZpYTZTJiXhyZtPJij8NrMye9EMCzwpQIfD2inYo +DFw== X-Gm-Message-State: AJcUukfEUmnTcj2in7gFYwkQOEMCDVrFKOeQ1eEwVg5WX1fudvREncfp nx46rFFyVq0HPRaOJO0B5PN2B9YA1F5xLdcaILHFcw== X-Google-Smtp-Source: ALg8bN7/h6ySGoPu2GtN8iXNm29yzoN02IL8nujzRWzkPrKpjZ7MAyotFAXwCnhr+JqK9829SsXwNwJ+T+qjx7Kk/kw= X-Received: by 2002:a50:b8e5:: with SMTP id l92mr22231603ede.294.1548703520355; Mon, 28 Jan 2019 11:25:20 -0800 (PST) MIME-Version: 1.0 References: <0e842838-e7d0-1b86-e27e-8d1562e70aee@yandex.ru> In-Reply-To: <0e842838-e7d0-1b86-e27e-8d1562e70aee@yandex.ru> From: Mark Saad Date: Mon, 28 Jan 2019 14:25:08 -0500 Message-ID: Subject: Re: CPU Isolation To: "Andrey V. Elsukov" Cc: FreeBSD Hackers Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 8EBD674297 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=longcount-org.20150623.gappssmtp.com header.s=20150623 header.b=BLauJtP4 X-Spamd-Result: default: False [-3.20 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; R_DKIM_ALLOW(-0.20)[longcount-org.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_SHORT(-0.09)[-0.086,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[longcount.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: alt1.aspmx.l.google.com]; DKIM_TRACE(0.00)[longcount-org.20150623.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[3.4.5.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FREEMAIL_TO(0.00)[yandex.ru]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(-0.81)[ip: (0.21), ipnet: 2a00:1450::/32(-2.25), asn: 15169(-1.93), country: US(-0.08)] 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 19:25:22 -0000 All Thanks for the replies, I had experimented with the init script method but ; I kept thinking that I was doing this wrong. I think that adding a loader option to isolate cpus from the scheduler would be useful; but I have no idea how to get there. My current plans are to setup init to use cpus 0-4 and to use 5-7 for my applications and see how it goes. The other test I want to try is to run some kernel threads on dedicated cores. Let me try to break stuff now. On Mon, Jan 28, 2019 at 7:20 AM Andrey V. Elsukov wrote: > > On 22.01.2019 21:29, Mark Saad wrote: > > All > > I am looking to setup a 12-STABLE box in a way that is similar to a > > CentOS server I am running. > > That server is setup using the boot option isocpus, to remove > > cores/cpus from the kernel scheduler at boot. What I want to try on > > 12-STABLE is to set aside some cores to run process and some kernel > > threads that will only always run on a dedicated core with out the > > chance for being preempted / interrupted by something else on that > > core / cpu . What I do not see is a way to evict processes off a > > running cpu post boot or a way to isolate them preboot. Am I missing > > something? > > > > After r331723 it is possible to make such separation after boot using > cpuset(8). If you need this a bit early, you need to modify sbin/init. > > -- > WBR, Andrey V. Elsukov > -- mark saad | nonesuch@longcount.org