From owner-freebsd-hackers@freebsd.org Thu Jan 24 17:58:45 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 0C85C14B7A7B for ; Thu, 24 Jan 2019 17:58:45 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (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 0981675FAF for ; Thu, 24 Jan 2019 17:58:44 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mail-wm1-x331.google.com with SMTP id f188so4004575wmf.5 for ; Thu, 24 Jan 2019 09:58:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=8JMEP0iElhHxSwxjbm/d1y+xqmuofgl7xu/hz1l3qKQ=; b=qPf0X/I8z7RNESDkUE9phXx+uNbkiHM7RcZJHJkqt1Aa4YdUHqohW4hGONM472l5UW w0k8aPKkGiZPuRaQfrRxLKBxu9K5tqs2u4kioDlDDEO/s1cFco6S7V3rnK6vVwYiVcxj Agd41V945LKpi60llo4PYL7yrMaJETT0jHR40rN4mobHNxyqxhH4hnUtntX7YOOJk4wG bW9n/dwlHGGrZIe4IIHROuT2k8yaHmHSqzj6PicLAlSocs73Ox+IojRY/lqYYmOuwnGh dRauE+b4Eqf6TQs0CBmjjVyyHwpZldZJQja95SAUaue4nsNiDVP8tYBjAaUzCEe2DVmG uvTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=8JMEP0iElhHxSwxjbm/d1y+xqmuofgl7xu/hz1l3qKQ=; b=eXdvePl6wjWmffhWEP1xGyVDOTVruQ4Rl7kCK4P/QlVAmosOax3vEriMC6+1q0gHIx h2ZpKZ3xZ42Ts4I6bhrPU5fyix6P/BZH0nI4DUH/5LAjkFyFDZRpAg1N7p41rYL4/+f8 AdPsBXtRgVPBibaXabCTJN/UK+PNz7dv3D2KVpjEgJugKhWuBPDFcGdpfVzW8Xox4cbn /ckipAk0JdQ9fdwarU1SyCz4s8VeU5WMls58B3wkiqfyVeJ5Ig9/8A6btFNl5It03OtJ mJVdyfeg8N2Vjc0gi8E/OJBjimx0pkM46NHHJH1yaopgS5ZEfHdRQh6pDggK1WIWylut xrwg== X-Gm-Message-State: AJcUukf8CdrBdOPcKcRF2jFPugkVPK/UcmwWl4wljLd+S8eR3W/Zi/vL VccM0YNVDaJFsQtPSl8r3n44mFIf X-Google-Smtp-Source: ALg8bN4/UE74gkDS+L9/Ons5iimg8ThA8iRQENXg+2aCoLalB6Et4VEN+22aRcP2/qM6THUJM96qZA== X-Received: by 2002:a1c:8d12:: with SMTP id p18mr3920290wmd.31.1548352722373; Thu, 24 Jan 2019 09:58:42 -0800 (PST) Received: from ernst.home (p5B0239C2.dip0.t-ipconnect.de. [91.2.57.194]) by smtp.gmail.com with ESMTPSA id s3sm45123078wmj.23.2019.01.24.09.58.41 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 Jan 2019 09:58:41 -0800 (PST) Date: Thu, 24 Jan 2019 18:58:40 +0100 From: Gary Jennejohn To: freebsd-hackers@freebsd.org Subject: Re: Scheduled ideas: Two threads with one "stone" Message-ID: <20190124185840.0973ea7f@ernst.home> In-Reply-To: <1ce4898f-942b-d5ec-7563-fdceb56f4e88@rlwinm.de> References: <1ce4898f-942b-d5ec-7563-fdceb56f4e88@rlwinm.de> Reply-To: gljennjohn@gmail.com X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 0981675FAF X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=qPf0X/I8; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of gljennjohn@gmail.com designates 2a00:1450:4864:20::331 as permitted sender) smtp.mailfrom=gljennjohn@gmail.com X-Spamd-Result: default: False [-6.64 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[gljennjohn@gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.90)[-0.899,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_TLS_LAST(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; FREEMAIL_REPLYTO(0.00)[gmail.com]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-2.73)[ip: (-9.47), ipnet: 2a00:1450::/32(-2.21), asn: 15169(-1.91), country: US(-0.08)]; RCVD_IN_DNSWL_NONE(0.00)[1.3.3.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] 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: Thu, 24 Jan 2019 17:58:45 -0000 On Thu, 24 Jan 2019 18:34:21 +0100 Jan Bramkamp wrote: > On 24.01.19 17:32, Zaphod Beeblebrox wrote: > > W.R.T. hyperthreading, it's come to my attention that FreeBSD has had some > > recommendations for awhile --- namely hyperthreading is bad for secure > > systems. That-is-to-say this is not about recent vulnerabilities of recent > > Intel flavoured CPUs, but rather some thoughts on a different solution to a > > different problem. > > > > I was building world on my laptop when I noticed how sucky it had become. > > Now... I well know this is due to the fact that even a "nice -19 make -j32 > > buildworld" will slow the normal priority userland down by about 1/2 > > because the thread that is "me" on the CPU is competing with one of the > > threads that is saturating the CPU. My normal priority thread will get > > scheduled, but it competes equally for resources with threads at much lower > > priority. > > You can use `idprio 10 ...` to minimize the impact of CPU bound tasks. > If you want to go even further you could apply hierarchical resource > limits on the make process. The idprio chainloader puts make and all its > descendants into the idle scheduling class which allows normal time > sharing threads to preempt them. > Or switch to SCHED_4BSD. I ran your command line and was still able to watch a HD movie in full screen mode without a single glitch. My Ryzen has 6 physical cores and 6 SMTs. -- Gary Jennejohn