Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1772878rdd; Thu, 11 Jan 2024 08:50:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFf1+8llWWBYYQu5xdwja4yvJiLI5BSaJBGpne6xeUbREhSXdd8pUCxw+A9zx9DWKKe/oUj X-Received: by 2002:aa7:c6d5:0:b0:558:76da:b974 with SMTP id b21-20020aa7c6d5000000b0055876dab974mr816772eds.27.1704991856463; Thu, 11 Jan 2024 08:50:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704991856; cv=none; d=google.com; s=arc-20160816; b=oUO9v/NCSSdSfwVf8l4INJMCixc4zMv97qg4zg+sbv7mT1AoIuDpXShp4mWBL0qWpC Y7qpmbwCvm98LyULH8cMaMkojEvPnX1AJk9Qrt1WySYXYxv86hP2/sGIysUohqqSpo68 RFZSwRCimys4t4Fox6j73CnabxXpdGPEBR1RMu1NvyhzGd4H4fBWOZ4zUZ+VrNYhhs5c LG/Wv7ylYfIKjGHqIXmG/X9Oj1fttdK87u5NZc9Vpf7WC71himuVyQ2PKalsPoCSOPZr S3cO9mhhq3Omgla+IJM/4R5FK4jVdy3EuJwTHY9NjxIgdooiqNh/vhUrIlGbCiOo0KMy BWzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=5r2dpKzpPM7p1IXawUf2NKSUect+eJPGZyCSRkJeR+w=; fh=Vhu2GN6Kd0CpJIXbH5SLeSgpqiBvbTobuY8+xcRa8qo=; b=Jxck0iUvyFG06yihO8yfsm2tDLrPHFOBmXuxGNissn97xY74DlPpfso7HIXtEQ1G/q mvJlb2K9jzQ7N7WCajrV1y0JVPnIiThwjzqMXV/xXJ+uIjk7vMPGcu5wVQ/x2mw9lL5g 36zp5MsjQ4qKghB0gvjeHKVjY3Sixtt4R7LunI5G4r1VISLh7gQ6tPBvTr5IthmAu4Au HAqFaiwJTbfrCnt7XKsNz96vxdjZvf8b46WFvBfe3uOAbUbTPiwXgpEIRlYwuUaZJbMR uisAUWvKtYZwn9hgeGEN8pkN3uOTHYs//APsVx0s41jDCKQ2anAZAUeHPP5uNpSfxXP8 4rrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=pLBbjTqf; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=0DtS3D3K; spf=pass (google.com: domain of linux-kernel+bounces-23885-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23885-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t17-20020a50ab51000000b005581ef9ef15si649382edc.386.2024.01.11.08.50.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 08:50:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23885-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=pLBbjTqf; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=0DtS3D3K; spf=pass (google.com: domain of linux-kernel+bounces-23885-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23885-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 am.mirrors.kernel.org (Postfix) with ESMTPS id AE7511F289D2 for ; Thu, 11 Jan 2024 16:44:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2FE3351012; Thu, 11 Jan 2024 16:44:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="pLBbjTqf"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="0DtS3D3K" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 32D6D51004 for ; Thu, 11 Jan 2024 16:44:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1704991461; 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=5r2dpKzpPM7p1IXawUf2NKSUect+eJPGZyCSRkJeR+w=; b=pLBbjTqfYeZKMJIOpBxdPF8AmHue55yIWh+sKk/Vl7etEUamXc2AtCVAoy06QosuBsZNPx 2G6Qz/fDljn/HCtrWKz1SUT7LwY8h2Wct5zBhVbYAvSlxAC9xezLtWGuCEjD8Bm+ENIwlk dTBQDTsuu/nKW61+0drAACpMpY5IEmTXLnSq3P1RgCOc+yu2F9hrBbTc4HlawXL5j0eXIB jVNu8ixYURO77ciqUZYq0KnmM6+RrDKjNj9VgGLtwsAVrtMIv/+DiwDYrTJyHcENI8SUmL PkAVLeiTCgt7/8eDoa8myV2XfCqptz/G8OSqGR5YAtwPSEWjeBG9IypXuhngPQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1704991461; 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=5r2dpKzpPM7p1IXawUf2NKSUect+eJPGZyCSRkJeR+w=; b=0DtS3D3K1UyP/rJDCCki9/PxbCVmMafero+bm4l437NE3e5l280O85JPXATI8lzjjoIO60 K4NWpjGtzooEERBw== To: Lizhe , ilpo.jarvinen@linux.intel.com Cc: linux-kernel@vger.kernel.org, Lizhe Subject: Re: [PATCH] hrtimer.c : Remove redundant thread state settings In-Reply-To: <20240110141349.52718-1-sensor1010@163.com> References: <20240110141349.52718-1-sensor1010@163.com> Date: Thu, 11 Jan 2024 17:44:20 +0100 Message-ID: <877ckfkefv.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Wed, Jan 10 2024 at 06:13, Lizhe wrote: > After a thread is awakened, its state is already task_running That's correct, but please look at hrtimer_wakeup() and the conditional schedule() invocation in schedule_hrtimeout_range_clock(). You break the guarantee that this function returns with task state == TASK_RUNNING. Thanks, tglx