From owner-freebsd-questions@freebsd.org Mon Nov 23 05:18:04 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0905847FF9C for ; Mon, 23 Nov 2020 05:18:04 +0000 (UTC) (envelope-from lari.sihto@gmail.com) Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cfb5Q694rz4tZL for ; Mon, 23 Nov 2020 05:18:02 +0000 (UTC) (envelope-from lari.sihto@gmail.com) Received: by mail-lj1-x235.google.com with SMTP id y7so1702259lji.8 for ; Sun, 22 Nov 2020 21:18:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8EQ3ivQQqWzZhd5m4sqOKYFtjlAgnYpdYfQr/9C5t5E=; b=XL15gbzSBVYw/f6xw/k17ZkKXtM+e/ZdpxsfsWE8lmmFc31GXOlIQKb10AS5UTV5On ORG+uLmzkcELsqLu8RJd2jsOixinFxozhbO1FdNYYclvZt5qllncImLRelDoLakY9Zo6 jywwLAK78zYVhJ6JcR+WM7FTyxakzuw9jz4Ddpzg8lHpGgzoZq/wiywIWpneA0tld3YS SopvvEQvpZxYBG3JoeXJI7X4D4W9BqQ54S1ZRjDC9E/CZ8kuotmZQvGL3BM+Ze4FBLG+ VAHtivvk8hRxoq7KrE+WHlo3dv8FHkVR9RPMQcnijRHwgqNtzZpPrM4KxyuU2jrN0HyP yaDQ== 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=8EQ3ivQQqWzZhd5m4sqOKYFtjlAgnYpdYfQr/9C5t5E=; b=FzOgegj/ReTJ0Bdl76SVbbjGYdNViJvXpdvvVi7kEo0bFvgbWqwicD7mtiQQgVGi5A 3D8vhD43h7m8PX36jRE2IADtW1FM4mCrcyZh8wCve9vr1Wwla5yDJgSz4BtTvFg3zRBh Y39Hl7/HdZZrozccGCNDhrOh1YdNEcNi+1IjsAsRtGkhVfCa7YVESl/Qj/Cor9ko/aW6 M7Ha2dAgWDy+d7mzKRQpYi9QTQD5J1ucpCsUm5ZlYQKDh9rn0XH8nyS7jzHmEH0kIFhf Gq7v7OZ24AphL8o0sNpXCHoakq2b7vZI9JH6U3Jd/jbziYM1NxCEbpKuFg9cLwfI8nfK pvRA== X-Gm-Message-State: AOAM533v9WycMAhRzxDGY0DL7VII5L+AUltZ1D2fdUgiyLasB19Erd7k 9chAAztne0a3jJh3Sk9Boo1n/8tKWh211WTRv3xB1JNBqjw= X-Google-Smtp-Source: ABdhPJz9jBY86cuxBYcvI1LatPLrqGna7s9ZzCDwwHFuhxp0znASnVBvxvkklwnZvp+zLA+G6u5G3qk3OiPK7xk/AJo= X-Received: by 2002:a2e:7306:: with SMTP id o6mr11701234ljc.306.1606108681044; Sun, 22 Nov 2020 21:18:01 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Lari Sihto Date: Mon, 23 Nov 2020 07:17:50 +0200 Message-ID: Subject: Re: kernel threads To: "Kevin P. Neal" Cc: freebsd-questions@freebsd.org X-Rspamd-Queue-Id: 4Cfb5Q694rz4tZL X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=XL15gbzS; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of larisihto@gmail.com designates 2a00:1450:4864:20::235 as permitted sender) smtp.mailfrom=larisihto@gmail.com X-Spamd-Result: default: False [-2.00 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::235:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(1.00)[1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::235:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::235:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-questions] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2020 05:18:04 -0000 Yes, that's it. Do you know why the top half is allowed to sleep but the bottom half is not? ma 23. marrask. 2020 klo 0.01 Kevin P. Neal (kpn@neutralgood.org) kirjoitti: > On Sun, Nov 22, 2020 at 09:59:57PM +0200, Lari Sihto wrote: > > Hi, just wondering if there is some technical or philosophical reason as > to > > why the freebsd operating system doesn't seem to use kernel-space threads > > like some other unix-like operating systems do. To my knowledge the need > > for kernel threads arises when the kernel code needs to sleep in kernel > > which one cannot do. Kernel threads seem to fix that problem. Have been > > wondering this for a long time and I hope someone here knows the > reasoning > > behind this implementation detail be it just performance related or > > something along the line of "no-one just haven't been up to implementing > > that kind of a functionality"? > > Are you thinking of something different than what is described in the > kthread(9) and kproc(9) man pages? > > Also, my limited understanding is that the "top" half of the kernel is > allowed to sleep, but the "bottom" half is not. > > You'll get more informed responses to this topic on the freebsd-arch, > freebsd-hackers, or maybe freebsd-current lists. Very few if any kernel > hackers hang out on this list. > > -- > Kevin P. Neal http://www.pobox.com/~kpn/ > "Not even the dumbest terrorist would choose an encryption program that > allowed the U.S. government to hold the key." -- (Fortune magazine > is smarter than the US government, Oct 29 2001, page 196.) >