Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp577871lqp; Fri, 5 Apr 2024 02:38:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX1qL2Kek/QJMdi1HxNDn7iWEPMV7iJ6Xf0g2pDikNqkP3V9Yl/Dfi18IzW+G4j6iEfcR9SodQA/yhulAADJG5HbP2UxyugOj1H4IsrPw== X-Google-Smtp-Source: AGHT+IG6iYhkjaH9c8BBOtCzoyf2Ta0XjWfImP4hqSyJfzBzyJKnAksHMSrVIIFKjFt+BlOMXvYa X-Received: by 2002:a05:6a20:7283:b0:1a7:2452:808f with SMTP id o3-20020a056a20728300b001a72452808fmr1278841pzk.53.1712309888062; Fri, 05 Apr 2024 02:38:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712309888; cv=pass; d=google.com; s=arc-20160816; b=agpmxeH+nvByqR91PjimLz3CLuG/M/nRMnb7k3JAJMiEqJoXSeldWYVQPlofr9o78A 0uKtYIg4HpMqh2hS7jlUYm9dQw2PHYAoxO2W0alS/vc3yUkRfAdSCo3txt74cuIDdIts AVNiQoalh1k0Ss9UsXP0CU7OlCrARNDFSpjaLTWAn2pwOP2F9B4SGncpx9v8jPjVfz9P BTN4rRdAvOJFFjxY5hlDskJ2zhQZaATmbZbDAHoRkY4dtcr7HC/mw63KXGiMvZAoic4e UTfmCMkhjbsqqO4/b682lhwPVmqaF9Yl1/zxKUEacdmsLbwtw081aSCB7V8GZbp8jXR4 QRTg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=7i6B99SnbU2yp2qEccSjOSod/Gd1R34IkiKn/iTeu1U=; fh=8/O+zp5RPEwXuNJKlTaavl41Eb9h1dWEvZoIN+oUPU0=; b=zSurac69O+fRcNlFKBFTdDMqFwuvLxZrWvymHQBh4RUEENMkD8tjZPx5AQlmxVvlSY MOraM+gS9HczW2rCy78PsCBFzgn4viWbQAvrMb3xcib1W5YeVaU326PEskf5OrM8EVsN HugaSAsEbsqLMW46gUa8YGvjkh4Mvh+/0Ta6piBUWIX37QHvKA0E2EmOwemhsURMIUYy koIc+ppStePhx9PhKb4/VDvzMpOoEu5vnQuOrKaQLufbNGM4D+D/++pC4cdyoubnjRbW Wd+9hJ7uVlGFU6Lpo4oN+rvNOawTv2Kl4cvF9S0if3XPo4ry5b7an5bdBF0xojfW2UFI Cteg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WdjB9hOI; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-132750-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132750-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d13-20020a170902654d00b001e2037d4657si1051100pln.174.2024.04.05.02.38.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 02:38:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132750-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WdjB9hOI; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-132750-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132750-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B807B282F8A for ; Fri, 5 Apr 2024 09:38:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4445216079D; Fri, 5 Apr 2024 09:37:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="WdjB9hOI" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07392160792 for ; Fri, 5 Apr 2024 09:37:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712309859; cv=none; b=Ov//C3thGgHf8D7n2wX6HgTN4hdXolExwsOoDAXP8vL86n2iqVkHEOKKH5F8Ctryk7YEZ9Zv7JnZvpuGqgW34xy40JEeR3ssINOtCrw3dFOOlCCTYO7vsfbzXGNme6jZIQUkan4RZytPuzWAOiplYxUOtk9nkLqRkKr3NWz6ekg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712309859; c=relaxed/simple; bh=hA6D7fT4sD8jKG9PTwt7L4CrU9WIO8s4oBXtxdTk/M0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ZMlSL3HZDYqaryu2VVtvtK1CA3Vbn7LV1fGs+VkHd2LoWJ2m61slaDv+yxgSEulaZOFKJzPJmfwPxwMfci1b2HjPP7SEY1oPu4sWcPJJNJwp66rIQkhh/ZfE+8yXNPfH3O9X1r95nB/qXPwvvn5mkSpot8mmPsXhq25bYrYO7kI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=WdjB9hOI; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712309857; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7i6B99SnbU2yp2qEccSjOSod/Gd1R34IkiKn/iTeu1U=; b=WdjB9hOIhAzrhL/gI/T6Qdsd8igg7O4jJ8cv28uqR5JWniOJIbBlZMLis5Sgt156jDF5+Z VrmDOo0fosXmDDAIAPu3m64Hn/Q4ZURXHsUSu666YpkEhgAe+04PURhNYsQmaigTLspVE4 tjkwE80b4ykkKjMwACucyWNWr1J1PEI= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-624-h3cdVzeiMam5tyuOxYRMfg-1; Fri, 05 Apr 2024 05:37:33 -0400 X-MC-Unique: h3cdVzeiMam5tyuOxYRMfg-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-a4455ae71fcso129655266b.3 for ; Fri, 05 Apr 2024 02:37:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712309852; x=1712914652; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7i6B99SnbU2yp2qEccSjOSod/Gd1R34IkiKn/iTeu1U=; b=Qv/0WqCWzmb4IP40Wn0Ujh40Km+WJXpEufeBp1uZlGia2jPpaAq0p2k609mqryie/e nle5oBblrWZOYoW7uw7hRyqWSGnHzb/ks7iOiKPCrznuuMuGiljTc4He8iRbvf0c1DEk hkXO7qz1+BEONl0kq5wTBWAg2tuLFqUfSmL9MKVcFNCgV1oAbH3TKkn6DYqNZKiG/zTi 6oLTfM8nlInQe+EpmOEAADjvR1YuEtFIQT4anQa4RrRohC1PZnYJ9ZSezcd+uK+wmKd9 W2SeaSyWFArJHIv0PS/0JQbo1OERmTLSk/VqVPeqfPoCvuj9KV+xJTKIaewjc38KQsuT q2Cw== X-Forwarded-Encrypted: i=1; AJvYcCXsLDCSKE0FZ67b7on0badfXWeILrLRgO/x5z4KLrBxoH8vXvH5jPNaIMPshbYeYU445YeST5OXx6TylLbick4OD2bmz4sWS1m8ljdm X-Gm-Message-State: AOJu0YxYZ71SNZXh40uu3x5XD7zUIa2Vre2PSTOTFoTLiu36pOicveni 9AvKkAGjkyYjYlAZmhWnzP3y4+84cAGhmGQDywsCJmUUrl+XT+g9YA/W7gjI3nyPYKlCZwyWL3B JtL4XdGUdaeGRTm7O+DA66h7C4zxVn+nINVuI8Pp8ICEv2akFwq6EhqQmFrVSHg== X-Received: by 2002:a17:907:da5:b0:a51:a995:607a with SMTP id go37-20020a1709070da500b00a51a995607amr693026ejc.25.1712309852555; Fri, 05 Apr 2024 02:37:32 -0700 (PDT) X-Received: by 2002:a17:907:da5:b0:a51:a995:607a with SMTP id go37-20020a1709070da500b00a51a995607amr693003ejc.25.1712309852226; Fri, 05 Apr 2024 02:37:32 -0700 (PDT) Received: from [192.168.0.182] (host-87-2-128-150.retail.telecomitalia.it. [87.2.128.150]) by smtp.gmail.com with ESMTPSA id jz8-20020a17090775e800b00a4672fb2a03sm645421ejc.10.2024.04.05.02.37.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Apr 2024 02:37:31 -0700 (PDT) Message-ID: <8567127c-c009-4960-a0e9-59f852571b11@redhat.com> Date: Fri, 5 Apr 2024 11:37:30 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 04/15] sched/core: Fix picking of tasks for core scheduling with DL server Content-Language: en-US, pt-BR, it-IT To: "Joel Fernandes (Google)" , linux-kernel@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider Cc: Suleiman Souhlal , Youssef Esmat , David Vernet , Thomas Gleixner , "Paul E . McKenney" , joseph.salisbury@canonical.com, Luca Abeni , Tommaso Cucinotta , Vineeth Pillai , Shuah Khan , Phil Auld References: <20240313012451.1693807-1-joel@joelfernandes.org> <20240313012451.1693807-5-joel@joelfernandes.org> From: Daniel Bristot de Oliveira In-Reply-To: <20240313012451.1693807-5-joel@joelfernandes.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 3/13/24 02:24, Joel Fernandes (Google) wrote: > * Use simple CFS pick_task for DL pick_task > > DL server's pick_task calls CFS's pick_next_task_fair(), this is wrong > because core scheduling's pick_task only calls CFS's pick_task() for > evaluation / checking of the CFS task (comparing across CPUs), not for > actually affirmatively picking the next task. This causes RB tree corruption > issues in CFS that were found by syzbot. > > * Make pick_task_fair clear DL server > > A DL task pick might set ->dl_server, but it is possible the task will > never run (say the other HT has a stop task). If the CFS task is picked > in the future directly (say without DL server), ->dl_server will be > set. So clear it in pick_task_fair(). > > This fixes the KASAN issue reported by syzbot in set_next_entity(). These two sched/core patches seem to make sense.... things are working with them. But I am not an expert in the CORE_SCHED, so I am adding them on top of the dl server series in the v6... it is easier for people to review them... The only thing I did was to adjust the log to fit into the 75 char that checkpatch warns... Thoughts? -- Daniel