Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1355756lql; Tue, 12 Mar 2024 14:53:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVyqFszboG0r0bycvN+iXYYwNybx6/J4/tGr5CkdRLzDU+z5dDPjfhjexCYkYuCV5GER7o667bzDAtdzl6qs/GRt8ZnRMjAMSy7mdrU+Q== X-Google-Smtp-Source: AGHT+IECPZIaiuWMMeuMcE7k2a/R3XzcPgRPNal8QPRkilHs4UzfdCEUleu5RWW/GpMmpP60GY9F X-Received: by 2002:a17:902:ec81:b0:1db:c6ff:6648 with SMTP id x1-20020a170902ec8100b001dbc6ff6648mr3004667plg.10.1710280422950; Tue, 12 Mar 2024 14:53:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710280422; cv=pass; d=google.com; s=arc-20160816; b=h9nMq3rsV8kFQrcDDGLWfZL5/Vyq+UNOV2P5JYnTQpnVohIoPnSyOPzngzVNjAhl54 N/pTLMp1FtCYCwQs7x6tHiz8hhhhnedPaRoA8e3NPK7JkN2MRzlxXx1eR3QQIE6W6+ab bdTJjGLa/SyhiHaU2KyC8GYctNdxrQbAUXS1OkY8NvZxQ1ak6LklPsbO1dMCJVcKyDdm hj/mvyXGzlcFZYT0P2bsCrARXIUC+GBiFX4bQr+mETvm9qL3HfKw9/x4c5bGdy0we3JJ u/Y/dnLpuF75QK4/D89HM0PwvTm3rBUpZLNKaaKu0zqqkFOlYCF5e0uPHvKjMcgo9sk5 wW6Q== 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=jgAoRXoGVuTzBazMoZQBPTv5bpPC2DD6aVA+CvxbndY=; fh=6OLdR+yAK0HyFPiM0v8i5O5GvKr64y4BaECi6NBt/8o=; b=Y+4LBOyE3cyYP98L0v1n4/zWwT58oJ4NOXGqEEEMDPP1Oz8NlSIkt1RgEWrY1Ermi6 mqn5epZJ/BFVrp93+MDpfjLwBG8/8FUXOQPEXPlXwB9tIiFsxeZJwdEIaGMs3bSUBcfk 9nSdBJXb965JwFrA+8rvMOxs0ICgNReBl1puvqPPC1opJUmeAo9yhM3ZEBpQZlJTBz00 nU3o+EX+dC2kYI1cJWW36l8LiD2dKR3Oy1wf9fbHKKk1Fk6uEIrFtBm6StN06n5Xnj1L lt818hfbItfJlgi9GV6is6ZEZyt+kDdQWJ8uj87LZtNZM3IHnjwyvftms74iaui/AtBi a2eA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=XogGqnUM; arc=pass (i=1 spf=pass spfdomain=kernel.dk dkim=pass dkdomain=kernel-dk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-100839-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100839-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id t20-20020a170902d29400b001dcfadc1cffsi7380723plc.392.2024.03.12.14.53.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 14:53:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-100839-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=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=XogGqnUM; arc=pass (i=1 spf=pass spfdomain=kernel.dk dkim=pass dkdomain=kernel-dk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-100839-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100839-linux.lists.archive=gmail.com@vger.kernel.org" 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 97D4D281AA1 for ; Tue, 12 Mar 2024 21:53:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D621C14375F; Tue, 12 Mar 2024 21:53:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b="XogGqnUM" Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A4A594AEEB for ; Tue, 12 Mar 2024 21:53:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710280416; cv=none; b=FaKDA5c5PuRb6WEI/+1EsGnPJbCMVgY4DjRzzryepQJf288PwQUDxVTxYQhs7PKwCNUSgeLKy63mQrPLzHzTFPRUixKnK1Tj8PKIJkBwiEvHB5/AIfQpuzKNN+e26Qr0p4Mrhjv93Th57A3oVYUvcV/MitLgSQRZHl4Q1G8aOyM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710280416; c=relaxed/simple; bh=GoH2vZtMQEyHzGMu+xjFvhPYeQ0PSvOxNtV0ej76tc8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ov/TAZdZwx/hBG+IN36WHWTKIhJ9yadFlpE7W45BMnpCYxqla/wpdthWccBfcXJJRtHI4aBjltGcZpivAuN341CY0fuQdPMqKpmWQNlAy++F6BELuj5po2FwWMOAG19DhwExcUOgJfE4OATBJsrotl54J6g2VRCcXd5YD6TScBA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk; spf=pass smtp.mailfrom=kernel.dk; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b=XogGqnUM; arc=none smtp.client-ip=209.85.214.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.dk Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1dd3c6c8dbbso10043095ad.1 for ; Tue, 12 Mar 2024 14:53:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1710280414; x=1710885214; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=jgAoRXoGVuTzBazMoZQBPTv5bpPC2DD6aVA+CvxbndY=; b=XogGqnUM7Bh5JnuGKX06R/t/aiIHEjMIZc3n0YJXm9qy17C5KE2EMmkT4jIjsZRc+H iHaaWfyDOtg8cY1T1XXgkM4hhZcfH6mx4cBz6rxxk0LoEPf/RIlo/H2Cz5XlBawAjnC4 cHVf975xy9zEAKCSx7CRpeU54++CYA5IrKic0EY03Y/Jf7lwgNRe00mWQGzhOLtakdy9 QsO2GuZIeP5uUUbpkU8epQ6F+4dNH0DKJQVU5lzhkC/3iuJhYkoDXfhqjQYYOeYUiTk1 cveG00kt4oO+O0PdddOwdQCvFbawaTvKxu6zdu9ZR4I06nMVbZ35RE5bFb1pz6PUxr5l 9xRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710280414; x=1710885214; 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=jgAoRXoGVuTzBazMoZQBPTv5bpPC2DD6aVA+CvxbndY=; b=d3v8PSZhZwl1pMVU/aHR9JfpzI2yfpO4/UTBMmpbiVsAqw4WZi3PwzQ7nB60jBlKvc s6k7zAyZ5YHPoVG3bhl0dmyCIx83lMsVEDQoiOu9n4Mc8lfIpxpBoO6RVJAajR6LlkGX jazrigQkc/iQEQ0IbMEbWMt1l44C3M+kjXf/Ex7iJNFswsd0LXrmKI7a7Wjtz+LZGcXl 1NDaiImqNQe2qeCOC8Tmyt7sgUzxHjuXVvP9AbcSeXQfJyS9dwcG6NS6UwdTCfSoy7Ah +mFeFsVjqlpl0Y3LI9NoORPpnO0cQrSSGH3+19kQLCFSuBU3NvIZ8W0wWO+N8eM4K+g9 5SBg== X-Forwarded-Encrypted: i=1; AJvYcCWLIjBanEK+qGqaqUAPCXa5wpxzIW5jf/1tdS/cwNDE+v+MIzxEXPVA72FRa7aj2qRlXvCXKwHUauUHXgCxWPh26ww9HoO1KCaZ9zIZ X-Gm-Message-State: AOJu0YwodyoljhIjAcAZDgL4JQQHGmtfwwDpEwJS/EAVymg+auCUlzD2 /18WpAGUWT7aIfaEiiwsdtiEUKEZJMu5ewdt1Djrks2tCLuc6UX7lF3QLUTQYe8= X-Received: by 2002:a17:902:8a91:b0:1dd:7350:29f6 with SMTP id p17-20020a1709028a9100b001dd735029f6mr3069799plo.3.1710280414017; Tue, 12 Mar 2024 14:53:34 -0700 (PDT) Received: from [192.168.1.150] ([198.8.77.194]) by smtp.gmail.com with ESMTPSA id p6-20020a170902e74600b001dd69a072absm7228013plf.178.2024.03.12.14.53.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Mar 2024 14:53:33 -0700 (PDT) Message-ID: <72921846-16d0-438f-a6b0-eef704542e6d@kernel.dk> Date: Tue, 12 Mar 2024 15:53:31 -0600 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: [GIT PULL] Networking for v6.9 Content-Language: en-US To: Jakub Kicinski Cc: Linus Torvalds , Johannes Thumshirn , davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, pabeni@redhat.com, bpf@vger.kernel.org, Tejun Heo References: <20240312042504.1835743-1-kuba@kernel.org> <20240312133427.1a744844@kernel.org> <20240312134739.248e6bd3@kernel.org> <39c3c4dc-d852-40b3-a662-6202c5422acf@kernel.dk> <20240312144806.5f9c5d8e@kernel.org> From: Jens Axboe In-Reply-To: <20240312144806.5f9c5d8e@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 3/12/24 3:48 PM, Jakub Kicinski wrote: > On Tue, 12 Mar 2024 15:40:07 -0600 Jens Axboe wrote: >> Hmm, I wonder if the below will fix it. At least from the timer side, >> we should not be using the cached clock. >> >> >> diff --git a/block/blk-iocost.c b/block/blk-iocost.c >> index 9a85bfbbc45a..646b50e1c914 100644 >> --- a/block/blk-iocost.c >> +++ b/block/blk-iocost.c >> @@ -1044,7 +1044,7 @@ static void ioc_now(struct ioc *ioc, struct ioc_now *now) >> unsigned seq; >> u64 vrate; >> >> - now->now_ns = blk_time_get_ns(); >> + now->now_ns = ktime_get_ns(); >> now->now = ktime_to_us(now->now_ns); >> vrate = atomic64_read(&ioc->vtime_rate); > > Let me try this, 'cause doing the revert while listening to some > meeting is beyond me :) Thanks! I think the better fix is probably the one below. I pondered adding a WARN_ON_ONCE() here, but I think just checking for in_task state is probably the saner way forward, just in case... But I strongly suspect the previous one should sort it for you. diff --git a/block/blk.h b/block/blk.h index a19b7b42e650..5cac4e29ae17 100644 --- a/block/blk.h +++ b/block/blk.h @@ -534,7 +534,7 @@ static inline u64 blk_time_get_ns(void) { struct blk_plug *plug = current->plug; - if (!plug) + if (!plug || !in_task()) return ktime_get_ns(); /* -- Jens Axboe