Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp758509imd; Fri, 26 Oct 2018 17:08:22 -0700 (PDT) X-Google-Smtp-Source: AJdET5cAzDHcNJSJfwk0W7qSSRwJHh0hxPgYgdRzjR2clgC0md5iWZUrdR7t1XEHVCWtAleByv+Z X-Received: by 2002:a63:b90a:: with SMTP id z10-v6mr5360387pge.221.1540598902158; Fri, 26 Oct 2018 17:08:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540598902; cv=none; d=google.com; s=arc-20160816; b=SbY1TS3T+HrI9Tx2e/L3g0cS67qhrTCm6EID45077iOPIm2ry6Km75aKWLHROA09PR 04+ZIOLTsGzsdszB58EwGHAdt8Wr/GTgy3rB37D5VVp4rQvKWtkQmYLaN8lIgBARGbk6 KccsX8bW/LI6k5JdRLnSXmaigodCMA/CfHCWvVyqQ/5iYq61d+3JNIaQKVE0GT//onql kQyXV8y64Pr3u7TtLFbo51TSzZyHGFpc4QIw0HkERuzvk/EGZOX594O/L7HNoOn5NyP5 UOKiDtQvOES60vR4+BW5iDZyt9Sf0z2dbDdBW9ibwWVJDCGEFaNo9IwzGJlrSu36Q97b JAsw== 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:openpgp:from:references:cc:to:subject:dkim-signature; bh=PHPso/Udnf8JDqgcmL2PDCJe/S9nUX89w6woEDGe9TU=; b=kthrTWIBnNQY9F08WC5VfC1Ivr4ebn9U/jcsKswvcFTy0b2DAQtWUhWHaqRQMMJZgX pGbXmQzTtaj4WLN9TfhD+ZKwGZUHxTLIkd3tN0AD7ZZX5IQmBqqSqNrPps6XC7RfnM4w B7PyV6JT5cwGSas18lX9IPkeJCDcSfWA5MN88Fb4ERH68s0upHONU1wLs2F451XDBz4l FQ70htiNYzJ7OJBcr7WGMlaCUk1Bm4m9EBVRFXL/QCPzFRMiHdkmPUSp3tpMsts6AZFj gL6agtE0IBQ0D+6loB2JxboHrUncOV9lwTMIQ7Hthpmq5CAicGaf2rA4bD+cLKmwHuvd pM3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.de header.s=amazon201209 header.b=M10XEl6z; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i189-v6si13238629pfg.281.2018.10.26.17.07.51; Fri, 26 Oct 2018 17:08:22 -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=@amazon.de header.s=amazon201209 header.b=M10XEl6z; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728342AbeJ0IqY (ORCPT + 99 others); Sat, 27 Oct 2018 04:46:24 -0400 Received: from smtp-fw-9102.amazon.com ([207.171.184.29]:24265 "EHLO smtp-fw-9102.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728129AbeJ0IqX (ORCPT ); Sat, 27 Oct 2018 04:46:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1540598837; x=1572134837; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=PHPso/Udnf8JDqgcmL2PDCJe/S9nUX89w6woEDGe9TU=; b=M10XEl6zsm+cF6xmC3d2aN/MQlEo7hIPxK/pOutl8iwUSsAC9jL/5Oin rnLva3F+ppX+Nft4+lRtqScVam17db3uxW09lDYy1vnraCHfRoYxXiaZf DjtJcQntz6pkbbloLrmJyowhJGcA2cBys/1nkiySbvLtvokyWVFsKwnCZ Q=; X-IronPort-AV: E=Sophos;i="5.54,429,1534809600"; d="scan'208";a="638710279" Received: from sea3-co-svc-lb6-vlan3.sea.amazon.com (HELO email-inbound-relay-2a-22cc717f.us-west-2.amazon.com) ([10.47.22.38]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Oct 2018 00:07:15 +0000 Received: from u7588a65da6b65f.ant.amazon.com (pdx2-ws-svc-lb17-vlan2.amazon.com [10.247.140.66]) by email-inbound-relay-2a-22cc717f.us-west-2.amazon.com (8.14.7/8.14.7) with ESMTP id w9R07Btc111328 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sat, 27 Oct 2018 00:07:13 GMT Received: from u7588a65da6b65f.ant.amazon.com (localhost [127.0.0.1]) by u7588a65da6b65f.ant.amazon.com (8.15.2/8.15.2/Debian-3) with ESMTP id w9R07CU6004631; Sat, 27 Oct 2018 02:07:12 +0200 Subject: Re: [RFC 00/60] Coscheduling for Linux To: Subhra Mazumdar Cc: Ingo Molnar , Peter Zijlstra , linux-kernel@vger.kernel.org References: <20180907214047.26914-1-jschoenh@amazon.de> <65abfba5-7c51-fd99-898e-f6e74969fea3@oracle.com> From: =?UTF-8?Q?Jan_H=2e_Sch=c3=b6nherr?= Openpgp: preference=signencrypt Message-ID: <3fbb5a02-1fc6-eaaf-b8b5-be8d24133747@amazon.de> Date: Sat, 27 Oct 2018 02:07:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <65abfba5-7c51-fd99-898e-f6e74969fea3@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/10/2018 01.05, Subhra Mazumdar wrote: > > >> D) What can I *not* do with this? >> --------------------------------- >> >> Besides the missing load-balancing within coscheduled task-groups, this >> implementation has the following properties, which might be considered >> short-comings. >> >> This particular implementation focuses on SCHED_OTHER tasks managed by CFS >> and allows coscheduling them. Interrupts as well as tasks in higher >> scheduling classes are currently out-of-scope: they are assumed to be >> negligible interruptions as far as coscheduling is concerned and they do >> *not* cause a preemption of a whole group. This implementation could be >> extended to cover higher scheduling classes. Interrupts, however, are an >> orthogonal issue. >> >> The collective context switch from one coscheduled set of tasks to another >> -- while fast -- is not atomic. If a use-case needs the absolute guarantee >> that all tasks of the previous set have stopped executing before any task >> of the next set starts executing, an additional hand-shake/barrier needs to >> be added. >> > The leader doesn't kick the other cpus _immediately_ to switch to a > different cosched group. It does. (Or at least, it should, in case you found evidence that it does not.) Specifically, the logic to not preempt the currently running task before some minimum time has passed, is without effect for a collective context switch. > So threads from previous cosched group will keep > running in other HTs till their sched_slice is over (in worst case). This > can still keep the window of L1TF vulnerability open? No. Per the above, the window due to the collective context switch should not be as long as "the remaining time slice" but more towards the IPI delay. During this window, tasks of different coscheduling groups may execute simultaneously. In addition (as mentioned in the quoted text above), there more cases where a task of a coscheduled group on one SMT sibling may execute simultaneously with some other code not from the same coscheduled group: tasks in scheduling classes higher than CFS, and interrupts -- as both of them operate outside the scope of the coscheduler. Regards Jan