Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3494289rwi; Wed, 12 Oct 2022 02:54:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Ptq4+lo6zkQrY8nSF+HnWoqre3DuHQIoyFWHr2HAkdUArFZpJPnIbczgEtTflOSRJpOqu X-Received: by 2002:a63:54b:0:b0:464:8e6:11e7 with SMTP id 72-20020a63054b000000b0046408e611e7mr8281305pgf.212.1665568477705; Wed, 12 Oct 2022 02:54:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665568477; cv=none; d=google.com; s=arc-20160816; b=OejabNHB3UqOwtJHO7uJSG5UaDLS3JHxaVpT9PWHI1tTUGbOOwPX15b+iHz6tahK71 isyksY4ne3hVUOgQl7d1tGpsmneLRO1T3Du0xD723PysPrD1WaeuyCQ/50ZWb/vKmQZO QhFJxonUGZqkYNVqSSxYbGv1QTWb+4+gr1AMIt8ZkYgRXM4ErYKbTorgzP/ycwIse7Z8 S7Itrhd6vNDg+4SIjoEz3svkoUO6f6zKgTDx5o4Ni3hUDV6ak4KAgK6NMzS6GIjMrXuf pGT89sOxJPBQ/DZsNbLSyffyFd7D/MbkSF7bgqP5SzMvjpoEaCIKMHcXhGZC0CaB6Rly B37Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YfsXCwTcSggyX7tuAnY2CtFIQ9nALKDQL/d2xvVqOBk=; b=rxpCwRABQIgFhD1Azdt+BpSThM4v3JiEJrfCN0AeVDDT8V1TuRP0m8J3F9+sYk1wWz sglvhAw8qrWz9i93DNbG98+8+uRRiazQNyQA6Z0NFVyinJmBeEYyTZ6ORXBI5AQenjp9 Sr+9ZL7E71IwyywOriYRRCtt8w/9Kp1HgIFAu00lBCSIpbpKB9EgIk9yTozJrwTTLdfV iE4HFQMAqyqPd7vV/hqQonL+u0wvo7rrm6A8p58DgveQGevWJqc0aI5zZlUWkjm1EDXC cyCce2lgp9RlVRF/3B62CTIv0ACRRlK9h38RS8x657eXuGPZMhk2JeRDDP7GVGfgALgA wDzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DaYjFAJU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r13-20020a170902c7cd00b001708af3828fsi15080742pla.62.2022.10.12.02.54.26; Wed, 12 Oct 2022 02:54:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DaYjFAJU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229696AbiJLJqp (ORCPT + 99 others); Wed, 12 Oct 2022 05:46:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229511AbiJLJqm (ORCPT ); Wed, 12 Oct 2022 05:46:42 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87744A3F51 for ; Wed, 12 Oct 2022 02:46:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665567999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YfsXCwTcSggyX7tuAnY2CtFIQ9nALKDQL/d2xvVqOBk=; b=DaYjFAJUUK6KMfulpUFDxEubPJ2Xaql/QhkGQS3jc+guMhOMr5wgYc8cdUg7l/1y74rbUS je6/k2uctMGhFT+xSLh/hGZsAJzo+cSwGaF/oHhJnvoiTQXpDf5gSTqCgd2zHtJ7wkyUot 1h/upa+ZTpwFhIK0wBeGiS9T875Lf+s= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-427-Duc00O_HOqyRvo5y6ye90A-1; Wed, 12 Oct 2022 05:46:38 -0400 X-MC-Unique: Duc00O_HOqyRvo5y6ye90A-1 Received: by mail-qt1-f199.google.com with SMTP id n11-20020ac8674b000000b0039c9e248175so2546510qtp.14 for ; Wed, 12 Oct 2022 02:46:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=YfsXCwTcSggyX7tuAnY2CtFIQ9nALKDQL/d2xvVqOBk=; b=0fM2VFts5yShz2YS0SfEMUCefxRYAFhZtRpGwfT0CTdSFNtUl+6tPyHrBwTxN1TDj6 gW4CeQ3If882QEKDXzVNXIYFGCrc5ua/e7+J9vYzCbvnCTyvrtaK2v87eNR4sgdlm68r grQGgeeTzk+b5FNUOyhiPNKJg1qzLgktwRvcLZPsAweYw1kGopPlBBc8uKdbUGza6iZw nDLOKHzXOropJfgMwgz3H4Gp85eLdgoNKJPyF4uV+ZXQe2S1CWr1VzbEAHVCvt8m0JTv 5ShGw4XLLA4iMg2GOaQRS33tjQTJkKNFN3DqyIXc29EHfkV/QxUnN8PbgGDtzTEF1bql UEAQ== X-Gm-Message-State: ACrzQf3mhKZnYui64ouMI+tZAGCYuyByCT/NnsN8z0fpNYK3zwV/z1rH 8fDcgY8mX4ElTBSUXpT1WM0AoRkIWwPu45HgpIeW+zpx9zwSxD4RV5epufSI5tpz7DjO9E+J8P9 Fd7Tw/MXkhIenHG/7gLl3kh8y X-Received: by 2002:a37:65c1:0:b0:6ee:9097:9ce3 with SMTP id z184-20020a3765c1000000b006ee90979ce3mr3418775qkb.620.1665567997630; Wed, 12 Oct 2022 02:46:37 -0700 (PDT) X-Received: by 2002:a37:65c1:0:b0:6ee:9097:9ce3 with SMTP id z184-20020a3765c1000000b006ee90979ce3mr3418760qkb.620.1665567997320; Wed, 12 Oct 2022 02:46:37 -0700 (PDT) Received: from localhost.localdomain ([151.29.60.69]) by smtp.gmail.com with ESMTPSA id t3-20020a05620a034300b006ecdfcf9d81sm7480168qkm.84.2022.10.12.02.46.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Oct 2022 02:46:36 -0700 (PDT) Date: Wed, 12 Oct 2022 11:46:29 +0200 From: Juri Lelli To: Joel Fernandes Cc: Connor O'Brien , linux-kernel@vger.kernel.org, kernel-team@android.com, John Stultz , Qais Yousef , Ingo Molnar , Peter Zijlstra , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , Will Deacon , Waiman Long , Boqun Feng , "Paul E . McKenney" , youssefesmat@google.com Subject: Re: [RFC PATCH 07/11] sched: Add proxy execution Message-ID: References: <20221003214501.2050087-1-connoro@google.com> <20221003214501.2050087-8-connoro@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/10/22 01:54, Joel Fernandes wrote: ... > > +migrate_task: > > + /* > > + * The blocked-on relation must not cross CPUs, if this happens > > + * migrate @p to the @owner's CPU. > > + * > > + * This is because we must respect the CPU affinity of execution > > + * contexts (@owner) but we can ignore affinity for scheduling > > + * contexts (@p). So we have to move scheduling contexts towards > > + * potential execution contexts. > > + * > > + * XXX [juril] what if @p is not the highest prio task once migrated > > + * to @owner's CPU? > > Then that sounds like the right thing is happening, and @p will not proxy() > to @owner. Why does @p need to be highest prio? No, indeed. I (now :) don't think the above is a problem. > > + * > > + * XXX [juril] also, after @p is migrated it is not migrated back once > > + * @owner releases the lock? Isn't this a potential problem w.r.t. > > + * @owner affinity settings? > > Juri, Do you mean here, '@p affinity settings' ? @p's affinity is being > ignored right? Yeah, @p affinity. > > + * [juril] OK. It is migrated back into its affinity mask in > > + * ttwu_remote(), or by using wake_cpu via select_task_rq, guess we > > + * might want to add a comment about that here. :-) > > Good idea! Connor, maybe you can add such a comment in the next version? Thanks! > I am also wondering, how much more run-queue lock contention do these > additional migrations add, that we did not have before. Do we have any data > on that? Too much migration should not negate benefits of PE hopefully. Looks like this is a sensible thing to measure. Best, Juri