From owner-freebsd-stable@freebsd.org Tue Dec 26 12:01:35 2017 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87B8DE891D9; Tue, 26 Dec 2017 12:01:35 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f54.google.com (mail-lf0-f54.google.com [209.85.215.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D55BA722D0; Tue, 26 Dec 2017 12:01:34 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f54.google.com with SMTP id f13so39419506lff.12; Tue, 26 Dec 2017 04:01:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=CrhIZ/Q9EvJosyG+gLCU2iiFg13+DyriWf3cYt1lSAg=; b=Mq0yQRR6JIz+nOtORXfk3qmdh3CsAesiaHcd5Zqr5Fpukq+NU/l0wI9l9n/6/jytWI 7zHtFLvu02NsNinP7P/Kckk9jVrrOIZht9dyRdu3UiHX8Oge4eYLkAHAuqUYrbjGlq3w mgI+8qM6fZOR7+39kaKLVaWcvoWXAME4SFIwn7ayfkXd4V/R3g00t9kjGm4zcBGiTjGG xQiUWkFJHTwysWnNUc9MBEbBvzPreL6WmZBy4MUbsv+HDqra2XTVum1avi4VwNZafFT0 75+QzIITv81DO/9dHPMfH9RReRoLyq7hGq2wIYv5JjzLllBrkTYpk/mDWPm0xM4WsPyA mzdg== X-Gm-Message-State: AKGB3mICn93Ms5qSVsBqYmudCOWFdzx52BJjmCSCVtIU0JEJsLg+iPU5 otnoQU2JUL2OlS11reU9xFrt92qM X-Google-Smtp-Source: ACJfBovQeQ7JCmsuO5TVessS2UqUSr/aJftKJz/yjXBFJo6HNscB4PwFbz3wlADAerhV7Rerbij9QA== X-Received: by 10.25.145.9 with SMTP id t9mr4179775lfd.88.1514288247340; Tue, 26 Dec 2017 03:37:27 -0800 (PST) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id v207sm1860299lfa.3.2017.12.26.03.37.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Dec 2017 03:37:26 -0800 (PST) Subject: Re: idprio(1) broken To: Eugene Grosbein , FreeBSD Stable Cc: FreeBSD Hackers References: <5A421212.4040703@grosbein.net> <5A4213DC.20508@grosbein.net> From: Andriy Gapon Message-ID: <92a254fb-8066-4930-e4ad-f4fedb0e84d0@FreeBSD.org> Date: Tue, 26 Dec 2017 13:37:25 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <5A4213DC.20508@grosbein.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Dec 2017 12:01:35 -0000 On 26/12/2017 11:18, Eugene Grosbein wrote: > On 26.12.2017 16:10, Eugene Grosbein wrote: > >> Is idprio(1) broken in stable/11? >> >> As root, start one bzip2 instance with idprio and one additional bzip2 intance per CPU core: >> >> # idprio 5 bzip2 -9 /dev/null & >> # n=$(sysctl -n kern.smp.cpus) >> # i=1; while [ $i -le $n ]; do bzip2 -9 /dev/null & i=$(($i+1)); done >> # top >> >> For dual core system, I see that idprio'd bzip2 takes all cycles of first core >> and two "normal" bzip2's share cycles of second core each taking ~50% of CPU time. >> >> It is expected that idprio'd bzip2 get no CPU time at all and each of "normal" bzip2's >> get ~100% of single CPU core for such setup. > > This works as expected for stable/10. Seems to work as expected on head as well. Tested on a 6-core physical system and a 2-core bhyve VM. # ps axwwl | fgrep bzip2 0 943 935 0 129 5 10564 2196 - RN 1 0:00.00 idprio 5 bzip2 -9 0 945 935 0 108 5 18332 9676 - RN 1 1:16.15 bzip2 -9 0 946 935 0 108 5 18332 9676 - RN 1 1:16.34 bzip2 -9 idprio isn't even able to exec bzip2. # ps axwwl | fgrep bzip2 0 28986 86816 0 129 5 18348 2324 - RN 17 0:00.02 bzip2 -9 0 28988 86816 0 106 5 18348 9680 - RN 17 1:27.25 bzip2 -9 0 28989 86816 0 106 5 18348 9680 - RN 17 1:27.86 bzip2 -9 0 28990 86816 0 108 5 18348 9680 - RN 17 1:35.50 bzip2 -9 0 28991 86816 0 106 5 18348 9680 - RN 17 1:27.00 bzip2 -9 0 28992 86816 0 106 5 18348 9680 - RN 17 1:25.83 bzip2 -9 0 28993 86816 0 106 5 18348 9680 - RN 17 1:26.76 bzip2 -9 -- Andriy Gapon