From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (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 BD223143733 for ; Tue, 12 Mar 2024 21:40:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710279613; cv=none; b=MW5lK/6E/Kw1a/mjp2St1eZpTfP/mo2YzccwgUNjPZBJPhbYBAAGzoQSkOZXIHHniOdXW+ybI3YQU9UzkSjcGB3hbjuBGM7qldvnkv90I4ZaUZ6N3k5PXnimfWqoMboUMJCZ+zqvC6se/TSryklf9Vo56y59TlPrQk/xmVJYMR4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710279613; c=relaxed/simple; bh=+oBn997uJy8z3i7Q2nllLFrjuAE+yfb7uicD9sTksS4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=O7OFIf98qf9RqdjFAl7aaTQM2tYtiUc8ZBLDZH60MQO3Gk/+hEy7uw2ZD1g4IUEOdDhPNglJqp7iihNRBM6w1dUwCTzh38IsmpqWOVlhE3hJJq9TIU3WlRZ8WeSVlLvR6o2qsLm8cTx5Sg0c6Yb1vJNrxNu0lEBZshsUdBIas8Q= 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=j+n4Me0M; arc=none smtp.client-ip=209.85.214.182 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 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="j+n4Me0M" Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1dcc0d163a1so12699385ad.0 for ; Tue, 12 Mar 2024 14:40:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1710279610; x=1710884410; 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=13av1ABYbiDWPdHc/R8lHWJKgGvE+CGOg+xLBagHaA0=; b=j+n4Me0Mj8GkIVow7fO085ckPWgxKscTmbxh8OP9y+9WxUZwqYyoAd7vmmzxzf1bR3 M2ax98fIgA0dRR7Mg1XklfDNoZdMn3j1xLuvgehkrjv2spL8Dwcwipr80l8UcAXBRW7m 6oUvMAY6sThSMK4bwd/WtMzf4aGGV3pg3G5XxdAbF6+Os2BlFJvBGoKw7ofL78AcOd3P nuN/IS7w+Ka0shlR1/ktrJHPD9U7U7jnTifnNYqBL0POomQ2QRcTyzJbi3sFTYSBOXF9 ygJpVL/u8HCbIMxO1iUNKMtbYPlJmIUHzLf6bphNeD0IGoPge1wJWfoQ7fxOv7OCk0aG m+Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710279610; x=1710884410; 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=13av1ABYbiDWPdHc/R8lHWJKgGvE+CGOg+xLBagHaA0=; b=rdFTM1K5iLbTzbh5AjvhwudL0Cp82Hm6Lc/JMFixWoRoJ1rs5vatSSPGBUyt2ZgnrE 4xe1u6zg1PU8wXy3OQwVMnrGIObWyGXyZ0/dyAgFykKk32PMqNJyZ++PZudrUYIoYaVN 8pkUQT/EWv6Jj+vUwUznZkial60YeixOCNZXiLGv56vwrjBRPh11ZFQzAN7Zv2u7oGZh OpE56G2Oo5dbeelIIjv+8554Jnkf7glrQQ5l20g2dNZ6dkq4QGPKBwVlO88w9lrWh069 tXOHfpH/P2YREuDZznIGvIXdK0NMZ1Qwhjm/HTp+nkiAq/nqMv/ClICde7400B3PcHw5 vo2Q== X-Forwarded-Encrypted: i=1; AJvYcCVJSYy6udk6BaweIpSWUn3LpN6C+NmxubyeY8UfIKQRJ/iUMPDua/7UkQ6sFW71Ns/JuZ+IPnnumEQ+26P0BEMyqH2d X-Gm-Message-State: AOJu0YzmgSARh7NwaJty3uC62utl7zVvQ2pgCIRSEVAdXSMDDcdZLJ1/ EQZ365KtdXBVqlze4wFwt/2TCnkQzBuAKpJ6Pa0VH2WZxgr2Qc6lEpjrBCPSEtZNVXZ1Vw+u/kt R X-Google-Smtp-Source: AGHT+IGdYi2xZX0kb/ozpi6PxI13btmek8Z08XjtS6L9vyMY2hkWQRaJtCAcvjr2u6yGZr5py/o1qQ== X-Received: by 2002:a17:902:ac96:b0:1dd:67ce:4a09 with SMTP id h22-20020a170902ac9600b001dd67ce4a09mr11971479plr.0.1710279609732; Tue, 12 Mar 2024 14:40:09 -0700 (PDT) Received: from [192.168.1.150] ([198.8.77.194]) by smtp.gmail.com with ESMTPSA id g6-20020a1709026b4600b001dd79b9b5c7sm7066176plt.161.2024.03.12.14.40.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Mar 2024 14:40:09 -0700 (PDT) Message-ID: <39c3c4dc-d852-40b3-a662-6202c5422acf@kernel.dk> Date: Tue, 12 Mar 2024 15:40:07 -0600 Precedence: bulk X-Mailing-List: bpf@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: Linus Torvalds , Jakub Kicinski , Johannes Thumshirn Cc: 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> From: Jens Axboe In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 3/12/24 3:11 PM, Linus Torvalds wrote: > On Tue, 12 Mar 2024 at 13:47, Jakub Kicinski wrote: >> >> With your tree as of 65d287c7eb1d it gets to prompt but dies soon after >> when prod services kick in (dunno what rpm Kdump does but says iocost >> so adding Tejun): > > Both of your traces are timers that seem to either lock up in ioc_now(): > > https://lore.kernel.org/all/20240312133427.1a744844@kernel.org/ > > and now it looks like ioc_timer_fn(): > > https://lore.kernel.org/all/20240312134739.248e6bd3@kernel.org/ > > But in neither case does it actually look like it's a lockup on a *lock*. > > IOW, the NMI isn't happening on some spin_lock sequence or anything like that. > > Yes, ioc_now() could have been looping on the seq read-lock if the > sequence number was odd. But the writers do seem to be done with > interrupts disabled, plus then you wouldn't have this lockup in > ioc_timer_fn, so it's probably not that. > > And yes, ioc_timer_fn() does take locks, but again, that doesn't seem > to be where it is hanging. > > So it smells like it's an endless loop in ioc_timer_fn() to me, or > perhaps retriggering the timer itself infinitely. > > Which would then explain both of those traces (that endless loop would > call ioc_now() as part of it). > > The blk-iocost.c code itself hasn't changed, but the timer code has > gone through big changes. > > That said, there's a more blk-related change: da4c8c3d0975 ("block: > cache current nsec time in struct blk_plug"). > > *And* your second dump is from that > > period_vtime = now.vnow - ioc->period_at_vtime; > if (WARN_ON_ONCE(!period_vtime)) { > > so it smells like the blk-iocost code is just completely confused by > the time caching. Jens? > > Jakub, it might be worth seeing if just reverting that commit > da4c8c3d0975 makes the problem go away. Otherwise a bisect might be > needed... 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); -- Jens Axboe