From nobody Mon Sep 23 09:47:16 2024 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XBypC5w9pz511rF for ; Mon, 23 Sep 2024 09:47:31 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XBypC247kz4cM9 for ; Mon, 23 Sep 2024 09:47:31 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-2d8a54f1250so2642326a91.0 for ; Mon, 23 Sep 2024 02:47:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1727084848; x=1727689648; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=WpmtajXBs42B0fUOkhSbwrIj4P6ls3o3JPonOI482xo=; b=usGwDuLBYAX3hIq0ZlHLQlR3IhAbyNvxHG1W6z6LbnQIG2Z+3jcf78qWGERb6HWolr bjFlEn1tdcoFytjqRd+VXtKacRsdhxPY8rYy1sgdPoSp7rfCE8DHFY6dcU8dGg5O+xyx Ktyl/CaMAgjF3ZZXAM/PTrbMVTm4JjYuD9APngzMn5VbfiTaQjk04hywc2etfgABNH0l RDE7hwWX9pB3cphLHHpfgqqnA3mbJB08p/1TAwRNrmMWo8MALuja0RMXIQ1tktsQrvLn GGtRSvabfYzh+020G075BAFf0vVONl1vvMn8xY1x/T3qwOFPU0R+WMx1byFN9hvj7/67 jbAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727084848; x=1727689648; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WpmtajXBs42B0fUOkhSbwrIj4P6ls3o3JPonOI482xo=; b=AIKBHc+MmeR9wLzdLFHjKM1Pjx1nIV1upIwmnWw8OsD+Wbl2vH4L5UDyZYJjNv4sBo m4huplgBqiBSJ6iBw1zbpMROzWmyh/q8vrbgq0l3gcOAr9hImcCkIhcct6gcdUvEgvqV DrgqajeTEv9EmrZ9B0n43nwQTbaPd3B+9WW5zphyAHYsFm+VTjB6dDoP9BEMqL9KHfdm hNUBQ4GCQMyPhbWEm8xRd4fe/BoMcGQKTSf8bphb0A8Q+WFkctqMPx3kd3jSfW1Q9Bdr PwsalK9E4/lSf1kJjiV+YXsdm087fpGFnx/drfO+J8t+bwYnVszhzyKWA9jV5uYQIhxc fu5g== X-Gm-Message-State: AOJu0YxRbzxxnVqeF85OYxPOJyYgAyhO2ydzjb2ZO+48hfhnSz9kjgpi 2vou+UtTVP5nuFhd3INCFwjngQI6lLczgdiT/sxeCqFEUTfoG8mXWpjPzeyL31bvjmrcLtgPB6j rYHFcncO963Sju6XG/O9zVwO71DtncN3k8QDQTjNdYTo0QCUEZ7M= X-Google-Smtp-Source: AGHT+IGTmLQinRwGBP8Sn5jAHKyNXihFKGIC1v9gimzG/URW8DugXMfBMkqa+YmkyODEtmoBLOpU/h3poa+14Q+0sCc= X-Received: by 2002:a17:90a:b316:b0:2d3:ba42:775c with SMTP id 98e67ed59e1d1-2dd80bfd635mr12868480a91.1.1727084848007; Mon, 23 Sep 2024 02:47:28 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: Warner Losh Date: Mon, 23 Sep 2024 10:47:16 +0100 Message-ID: Subject: Re: nvme(4): some non-operational power states are broken To: Alexey Sukhoguzov Cc: FreeBSD Hackers Content-Type: multipart/alternative; boundary="000000000000dce7450622c6464f" X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4XBypC247kz4cM9 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated --000000000000dce7450622c6464f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Sep 23, 2024, 10:41=E2=80=AFAM Alexey Sukhoguzov = wrote: > Hi, > > My NVMe controller is Toshiba XG5, and it has 6 power states: the > first three (0-2) are normal and the last three (3-5) are NOPS. > Here is 'nvmecontrol power -l nvme0' output: > > # Max pwr Enter Lat Exit Lat RT RL WT WL Idle Pwr Act Pwr Workloadd > -- -------- --------- --------- -- -- -- -- -------- -------- -- > 0: 8.0000W 0.000ms 0.000ms 0 0 0 0 0.0000W 0.0000W 0 > 1: 3.9000W 0.000ms 0.000ms 1 1 1 1 0.0000W 0.0000W 0 > 2: 2.0000W 0.000ms 0.000ms 2 2 2 2 0.0000W 0.0000W 0 > 3: 0.0500W* 1.500ms 1.500ms 3 3 3 3 0.0000W 0.0000W 0 > 4: 0.0050W* 6.000ms 14.000ms 4 4 4 4 0.0000W 0.0000W 0 > 5: 0.0030W* 50.000ms 80.000ms 5 5 5 5 0.0000W 0.0000W 0 > > The problem is that only one of the NOPS is working as expected > (state 3). Another two (states 4-5) skyrocket the controller's power > consumption far beyond normal (0-2) power states do, and far beyond > reasonable. For example, when the controller is in state 3, my > system consumes about 3-3.5 W at idle (according to acpiconf with > laptop power cable unplugged), in states 0-2 - about 4 W, and in > states 4-5 consumption is approaching 6 W. Thus, the NVMe becomes > the hottest part of the system (>50C, still idle), and it eats up > almost half of the battery alone. > > Linux doesn't have this issue, so it seems to be nvme(4) related. > All the above data is collected on 14.1-RELEASE Live USB with no > filesystem mounted. 15-CURRENT has the same problem. > > Any ideas what it might be? > Does Linux have active power state management? Warner > Regards, > Alexey > > --000000000000dce7450622c6464f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Sep 23, 2024, 10:41=E2=80=AFAM Alexey Sukhoguz= ov <mail@eseipi.net> wrote:
Hi,

My NVMe controller is Toshiba XG5, and it has 6 power states: the
first three (0-2) are normal and the last three (3-5) are NOPS.
Here is 'nvmecontrol power -l nvme0' output:

=C2=A0#=C2=A0 =C2=A0Max pwr=C2=A0 Enter Lat=C2=A0 Exit Lat RT RL WT WL Idle= Pwr=C2=A0 Act Pwr Workloadd
--=C2=A0 --------=C2=A0 --------- --------- -- -- -- -- -------- -------- -= -
=C2=A00:=C2=A0 8.0000W=C2=A0 =C2=A0 0.000ms=C2=A0 =C2=A00.000ms=C2=A0 0=C2= =A0 0=C2=A0 0=C2=A0 0=C2=A0 0.0000W=C2=A0 0.0000W 0
=C2=A01:=C2=A0 3.9000W=C2=A0 =C2=A0 0.000ms=C2=A0 =C2=A00.000ms=C2=A0 1=C2= =A0 1=C2=A0 1=C2=A0 1=C2=A0 0.0000W=C2=A0 0.0000W 0
=C2=A02:=C2=A0 2.0000W=C2=A0 =C2=A0 0.000ms=C2=A0 =C2=A00.000ms=C2=A0 2=C2= =A0 2=C2=A0 2=C2=A0 2=C2=A0 0.0000W=C2=A0 0.0000W 0
=C2=A03:=C2=A0 0.0500W*=C2=A0 =C2=A01.500ms=C2=A0 =C2=A01.500ms=C2=A0 3=C2= =A0 3=C2=A0 3=C2=A0 3=C2=A0 0.0000W=C2=A0 0.0000W 0
=C2=A04:=C2=A0 0.0050W*=C2=A0 =C2=A06.000ms=C2=A0 14.000ms=C2=A0 4=C2=A0 4= =C2=A0 4=C2=A0 4=C2=A0 0.0000W=C2=A0 0.0000W 0
=C2=A05:=C2=A0 0.0030W*=C2=A0 50.000ms=C2=A0 80.000ms=C2=A0 5=C2=A0 5=C2=A0= 5=C2=A0 5=C2=A0 0.0000W=C2=A0 0.0000W 0

The problem is that only one of the NOPS is working as expected
(state 3). Another two (states 4-5) skyrocket the controller's power consumption far beyond normal (0-2) power states do, and far beyond
reasonable. For example, when the controller is in state 3, my
system consumes about 3-3.5 W at idle (according to acpiconf with
laptop power cable unplugged), in states 0-2 - about 4 W, and in
states 4-5 consumption is approaching 6 W. Thus, the NVMe becomes
the hottest part of the system (>50C, still idle), and it eats up
almost half of the battery alone.

Linux doesn't have this issue, so it seems to be nvme(4) related.
All the above data is collected on 14.1-RELEASE Live USB with no
filesystem mounted. 15-CURRENT has the same problem.

Any ideas what it might be?
<= br>
Does Linux have active power state management?

Warner


Regards,
Alexey

--000000000000dce7450622c6464f--