Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1426764imm; Wed, 20 Jun 2018 18:26:44 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJabuQMDZDt/ubsObtKqtOzsR45KPB39Xm+w5h58BcDte2K/CUpJoq6TSVOX8HMvNghIKkw X-Received: by 2002:a63:83c3:: with SMTP id h186-v6mr20278851pge.298.1529544404730; Wed, 20 Jun 2018 18:26:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529544404; cv=none; d=google.com; s=arc-20160816; b=glZ72+WQqAhJPlBQNIVx5hdS9OZn68hsTSYlnw3o2lvxHuh/52RdG1JfdoBKgvAyD7 6GoBmsAH9zQS3lAWAN6e1IEQtinqAH8rwrxAF7QF6qTa0ivvHqUU38axZhmMvjA82Ebk ce9a6Cj+lDSc9TSfBkVM4jyHi9QD0ltcaFa4JUZwJFuSh5gC9RwQNYVjz/xiJf69adZj 2JdlQSGZjYGPl1env7L5owJxqP8X5+R+GURxMCLUFFldOisBg7KPRnUzhCQCfDXysV/1 fxAgEe6ZjvIkZil8lyvf8PpgoGEtrhUdhG0gMy7TPOkqDlEjXnneJlUzaD+9NHUtYuvJ 0UWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :dkim-signature:arc-authentication-results; bh=124nx/Bf6urjW7NWwZUHKIblzUEVgqs8s6fX/vjUI10=; b=ljkjl8tbL9X+DLLXdz9rsUlFRmty3uSbeL1AanhMAebY4vF6iTzeRBRjaVU0byjK6b Kg+nZRB9Jc+x7u9acCJ1TLwkV45hcFgVTasayg5a2fyqZEjojssR7751yXx4Bk80YKxk c3plxThPnxcUanuKGnSgdN/+eMmBjil8SrZ3S83lBtkqYd4LIG1VnNntG5GO9GzbwqdU 7hVZ/hrFKcsmSctHXyD+SMkd3Z5+09fXUSATz37QrvkBm82c58cgy2Zu/qX96Y+7K2q6 4OOlI8v8lXwKRjmXbfHX3cUuLK42otO1B64M3XAVvMG5QPK9ybSl0CIEJcGDJZM80/UL GYQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Djf+HQt8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o5-v6si2992729pgs.303.2018.06.20.18.26.30; Wed, 20 Jun 2018 18:26:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Djf+HQt8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754522AbeFUBYj (ORCPT + 99 others); Wed, 20 Jun 2018 21:24:39 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:33458 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754101AbeFUBYe (ORCPT ); Wed, 20 Jun 2018 21:24:34 -0400 Received: by mail-pl0-f67.google.com with SMTP id 6-v6so728022plb.0; Wed, 20 Jun 2018 18:24:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=124nx/Bf6urjW7NWwZUHKIblzUEVgqs8s6fX/vjUI10=; b=Djf+HQt8FKQKNeAh4/aKUefUqjuuus6pbqRr5+gns/Kp5JDkh/jqxvBn6QJx1t/vbD 8pxNxmGPgWH6wZf1LKkKa3YPJ37YGkpM0Gjg0B8aG+oCgdYVnjKEY9gaI89ufaEN6Aun 5Bj5/p53PkDXza7a5rAh9qvYHLos48HgkwnSH4fswKwKfi+mI4D2IoIuTrCoBeF0/8rE TA+qDo8u4Pj8pjScGG9lOD5zQgb9XlN+jxtVMNocDod4KnEEG5CQAUa9NPtrWRKyKcBc hvJryjrqC9Hg3jxZvANHGQJQWQawI/94ucuWj6Shs+ncmAjtgga/x5kgvncYDJjLNgos zF2g== 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:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=124nx/Bf6urjW7NWwZUHKIblzUEVgqs8s6fX/vjUI10=; b=HlSV8tkroAucbvvuiWMsilQkBZzrw10YBpeqZXt7DNsOE4SFhWTWnd2k7Ptg+ZC5se RWIvcV0as+5rI7YO9zguDOeF5TZ+fuvYQXH2NiIo6JeAOxJLpaWTgSS6hyWXkaYoBklJ SbUxUHkyFt3APRxHFkszEd2ng+vpmgOy7wJwdNTBHmyNxc8NVFJxIckHDViZ8o2Rgvjb FXrp54fOllHTSNeJEGO6pGjl6ygwFk2LSCfd1/usr35b/rN8Mj3Bv4zhMeLjERgjVJj7 fKFE2nwZ5t250HuJXbHs08zcInkq+PjMGZkxVzDexPN/2LLyHR3vS5GDjDat+PSdXYRy p4tQ== X-Gm-Message-State: APt69E0Aay4fCNXjTYcearY5mBmzHcVqgLWHcuAoRz0hTqPOAypOt8/B hbXjkuqd3+Ud6cDFWp6uqCU= X-Received: by 2002:a17:902:7e08:: with SMTP id b8-v6mr374202plm.230.1529544273714; Wed, 20 Jun 2018 18:24:33 -0700 (PDT) Received: from [192.168.1.5] (c-73-157-163-165.hsd1.or.comcast.net. [73.157.163.165]) by smtp.gmail.com with ESMTPSA id x24-v6sm6683537pfj.104.2018.06.20.18.24.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jun 2018 18:24:32 -0700 (PDT) Subject: Re: [PATCH v3 0/2] tpm: add support for nonblocking operation To: James Bottomley , Tadeusz Struk , Jarkko Sakkinen Cc: jgg@ziepe.ca, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, philip.b.tricca@intel.com, "Dock, Deneen T" References: <152882630662.30206.8805136953394285180.stgit@tstruk-mobl1.jf.intel.com> <20180619131046.GC5609@linux.intel.com> <1529539176.4163.2.camel@HansenPartnership.com> From: Tadeusz Struk Openpgp: preference=signencrypt Autocrypt: addr=tstruk@gmail.com; prefer-encrypt=mutual; keydata= xsDiBEiLICMRBADteQacQxypsuFvAw6IwYzbD8pgQi+kLYBcqfGgVAUN/cO+sLl6u1lVdaDB fhAArdbV9lpoqcWnmhQFTb4A+W569EpydBr6nuatWkEB+fmmx8YoUtuZfXt7v+1l1rc09kaW LY+TkwQkvFCeuvdasgmBLnmRWymEGWi1E12hUgTw/wCgtK24geC7XkiuANMv0gpr+raOgQMD /2yJZ0SeXQApWyTRaeIYN8GgYHZTWuBp/ofN+viEkhrDxahcaGPP5B/Nv6VS1+M0e5m8OzHj qPUbgfyOeJcslC5aoZdqqqzVWVLaA/+Jy+O+6T3k3R/IryVVATldBlwnGFDhET0mKQsd15zt cIdQBBbfSFR5VlugZuWV5q442IpPA/4g7nen9FFPxh45Te8D54hAsOCywjm6xUE0UJGYHeJ/ MXCPtuXfVCbYcOxZVH7kUS2Vtk5d3bF40IE2WnVq1ZScNANF4ZjikxYhYGfNWX3HXak1gSoj UrY87rMSjPIAry4L0BoIx2qgL/k4iV/3QcXL4t5wosU0iw++suf1zGGcKM0gVGFkZXVzeiBT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linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <1529539176.4163.2.camel@HansenPartnership.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/20/2018 04:59 PM, James Bottomley wrote: > I'm slightly surprised by this statement. I thought IoT Node.js > runtimes (of which there are far too many, so I haven't looked at all > of them) use libuv or one of the forks: > > http://libuv.org/ > > As the basis for their I/O handling? While libuv can do polling for > event driven interfaces it also support the worker thread model just as > easily: > > http://docs.libuv.org/en/v1.x/threadpool.html Yes, it does polling: http://docs.libuv.org/en/v1.x/design.html#the-i-o-loop > >> Similarly embedded applications, which are basically just a single >> threaded event loop, quite often don't use threads because of >> resources constrains. > It's hard for me, as a kernel developer, to imagine any embedded > scenario using the Linux kernel that would not allow threads unless the > writers simply didn't bother with synchronization: The kernel schedules > at the threads level and can't be configured not to use them plus > threads are inherently more lightweight than processes so they're a > natural fit for resource constrained scenarios. > > That's still not to say we shouldn't do this, but I've got to say I > think the only consumers would be old fashioned C code: the code we > used to write before we had thread libraries that did use signals and > poll() for a single threaded event driven monolith (think green > threads), because all the new webby languages use threading either > explicitly or at the core of their operation. Regardless of how it actually might be used, I'm happy that we agree on that this *is* the right thing to do. Thanks, Tadeusz