Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932696AbcLAWgC (ORCPT ); Thu, 1 Dec 2016 17:36:02 -0500 Received: from mga05.intel.com ([192.55.52.43]:4657 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761434AbcLAWf6 (ORCPT ); Thu, 1 Dec 2016 17:35:58 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,284,1477983600"; d="scan'208";a="37838107" Date: Thu, 1 Dec 2016 14:28:12 -0800 From: yunhong jiang To: Chris Metcalf Cc: "linux-kernel@vger.kernel.org" , Paolo Bonzini Subject: Questions on the task isolation patches Message-ID: <20161201142812.369f23f8@jnakajim-build> Organization: otc X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1723 Lines: 35 Hi, Chris I noticed your task isolation patch set at https://lkml.org/lkml/2016/8/9/759 . Thanks a lot for the great effort. I checked the patch and have some questions about how to use this functionality on the NFV environment. In the NFV scenario, high speed network code runs on a VM user space and the VM is hosted by KVM hypervisor. To achieve the high speed network, not only the network code should be isolated, also the vCPU thread. I checked your patch to think how to isolate the vCPU thread, and I have some questions and hope your hints: a) If the task isolation need prctl to mark itself as isolated, possibly the vCPU thread can't achieve it. First, the vCPU thread may need system service during OS booting time, also it's the application, instead of the vCPU thread to decide if the vCPU thread should be isolated. So possibly we need a mechanism so that another process can set the vCPU thread's task isolation? b) I noticed that curently the task_isolation_prepare() is invoked on exit_to_usermode_loop(), while we may need such job on VM Exit procedure, or interrupt handling during VM exit handling. Also, I'm also considering how to utilize this task_isolation for network node which is not busy-loop, like the interrupt mode DPDK code. In the interrupt mode DPDK code, the application may yield the CPU if there is no network packet for a very long time and it will re-enter the busy loop mode once new packet arrived. This interrupt mode will be helpful for both power management and resource utilization. Per my understanding, the application should turn off the task isolation before yield the CPU and the restart the task isolation after the new packet, right? Thanks --jyh