From nobody Wed Dec 17 22:36:11 2025 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 4dWpYp5LWKz6LYqS for ; Wed, 17 Dec 2025 22:36:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) (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 4dWpYp1zNQz3SSS for ; Wed, 17 Dec 2025 22:36:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x1033.google.com with SMTP id 98e67ed59e1d1-34c7d0c5ddaso7859a91.0 for ; Wed, 17 Dec 2025 14:36:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1766010982; x=1766615782; 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=lxsEjEsUe7vPlX+qNc5g19ngMEWrKKfyLz0x5lO9xIM=; b=tHgDuXjwq143g1Rvy8MnLn3zvkETiRXQfNQcRaJp6m7qP08RCt28R3+ueJKmCmk5sP M/0R5RLc6onjnHZIiO8959epfsCZOdokSH8Ub7MH+EjIJ+hS5HTpypMC/eCmiYgn76bf nnDUchOpWujmXyaXOYE6xI0g6pl0ROJIHXNCMhMuP2HVz1aG3vDU6wztTKJoP1YwK6qF 4KaAe0r4OayroquEN7dx2kXMFoKJtZWa7uZQFX7dtwnRVQg8PGQgeKsdS/Fe8MvFWBtH H8E+7gdelj1+IwQlLuOw/A4gzVlpzFv75ZZ6Y4BKSSPZFqTLXjJ1yjxaCeB8NFhytOAs RZMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766010982; x=1766615782; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=lxsEjEsUe7vPlX+qNc5g19ngMEWrKKfyLz0x5lO9xIM=; b=kKR3LTzUX13S5nX3TGFyZuYfNiPt8dcTXWs0d9uETQEuPujH77ElQzKeR8LauL7zjf etI+gnIXS4wAa39u4x4SH+8+dggpk0rTkxo3z2poNljkN4XsaZm7BZtehHYP4oglx7jr zExNFZE5/8Zqiys+2v9ac5sj778G5RRw+m/QjYrLV8hGzTjGIDTpgZ+megLyCtYkQaPr y6kKwO2a0tsAVDNm2S71gxyBM3gD/l5atvaNXbuJiqtK5YqmQZvakM0p/aVsEgQiQ4vg lJNsZpmyhlPqx2AK3CL2RUHiTm9X2bAWH/Hlgha4odfDp3y4pkZORpMyTQCiHnKuLW+7 NQig== X-Gm-Message-State: AOJu0YziHlYbQuWLtsELj+FJlgTXQtj6vTS8QrVB+7MDfNp08q4bY5Bp QsNljWwzNnhRV2TvcB0XQDPLIvhJ5aYEG/e6U6bpBSZwmmuqgdB3LGLf1flfyeW+/Xz6iGeZNZ0 ycO6dsoCupSZsYYgousWy52c7kDTOlLtgDNHFDFgvfQjJPHY4e48B6dM= X-Gm-Gg: AY/fxX5pvQiC8G+f2AmW0UvxzJJ9zg8CxxpszWDa/sjxKkioi2kP7y2ViKB8m7jpvtJ uQp1cKT4mJ2BqS4t+sqDw10xHxFRy0K/rDeHi0tY2x/3zhikSIuF9Sq2AZ52VeaS4Pb3BZGjheW alUfP3gILFYKueZwIxM1bjqcrDChH7wLHt977rgXMaPhZkOiK3HamEZZtobu/EmCJdaZ0EhL7OQ i0n8M4LnTQMUGLp4iFwNYjKXAby7twQlnMWUmh9yDl8JMY/htKjGhehVufPwI6PcdaI9WY= X-Google-Smtp-Source: AGHT+IHB0h2pJPerMI+eobyS9vJHvyjUWPr/t9O9AHHKFzTyRgE73SruqXzy9vhcuSvBC2A0IkxOMwkefubeyuU4rVw= X-Received: by 2002:a17:90b:55ce:b0:349:162d:ae0c with SMTP id 98e67ed59e1d1-34e71d9d66cmr685645a91.4.1766010982484; Wed, 17 Dec 2025 14:36:22 -0800 (PST) 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: Wed, 17 Dec 2025 15:36:11 -0700 X-Gm-Features: AQt7F2qnJLpTtvlf-mchjPIcPkngADy2H3dtSxgqaDGfPAUapDcpC9df6OJR0_A Message-ID: Subject: Re: Prevent spin-up of USB HD after upgrading to FreeBSD 15 To: Martin Cc: "freebsd-hackers@freebsd.org" Content-Type: multipart/alternative; boundary="00000000000047dcb006462d79ad" X-Spamd-Bar: ---- 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-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dWpYp1zNQz3SSS --00000000000047dcb006462d79ad Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Dec 17, 2025 at 3:29=E2=80=AFPM Martin wrote: > On Wednesday, December 17th, 2025 at 6:29 AM, Warner Losh > wrote: > > > On Tue, Dec 16, 2025, 10:17=E2=80=AFPM Martin wro= te: > > > > > I posted this in "questions", but think this might be the more correc= t > > > place. > > > > > > I have an external Toshiba USB drive that automatically spins down > > > after about 1 minute of idle. After upgrading to FreeBSD 15, the driv= e > > > keeps spinning up again about every 5 minutes even though it is not > > > being used and isn't mounted. This didn't happen in FreeBSD 14.3. > > > > > > The drive is running ZFS. > > > > > > I have monitored both /var/log/messages and daemon.log using tail to > > > see if anything happens, but nothing goes on in those logs when it > > > happens. > > > > > > If I export the drive rather than just unmount then it doesn't happen= . > > > So I am guessing that it's something ZFS specific/related perhaps. > > > > > > I have also tested the same drive on the same machine using Artix Lin= ux > > > and the drive stays spinned down, even when fully mounted using ZFS. > > > > > > I have used "top -s 0.1" in order to see if I can get a glimpse at > > > something which might run on FreeBSD, but nothing is started. > > > > > > What has changed from 14.3 to 15 that might cause this annoying > > > behavior? How do I track down what's spinning up my drive? > > > > > > I have a dtrace thing that can find all the commands being sent. > > > > But before i go to the hassle.. what happens if you set > kern.cam.da.poll_period=3D0? > > It's the same, nothing changes. > OK. So it's not the media polling code. I'll see if my camio code is in shape to share. What's your level of comfort using experimental code you might have to tinker with a little bit? Warner --00000000000047dcb006462d79ad Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Dec 17,= 2025 at 3:29=E2=80=AFPM Martin <= iio7@protonmail.com> wrote:
On Wednesday, December 17th, 2025 at 6:29 AM, Warner Los= h <imp@bsdimp.com> wrote:

> On Tue, Dec 16, 2025, 10:17=E2=80=AFPM Martin <
iio7@protonmail.com> wrote:
>
> > I posted this in "questions", but think this might be t= he more correct
> > place.
> >
> > I have an external Toshiba USB drive that automatically spins dow= n
> > after about 1 minute of idle. After upgrading to FreeBSD 15, the = drive
> > keeps spinning up again about every 5 minutes even though it is n= ot
> > being used and isn't mounted. This didn't happen in FreeB= SD 14.3.
> >
> > The drive is running ZFS.
> >
> > I have monitored both /var/log/messages and daemon.log using tail= to
> > see if anything happens, but nothing goes on in those logs when i= t
> > happens.
> >
> > If I export the drive rather than just unmount then it doesn'= t happen.
> > So I am guessing that it's something ZFS specific/related per= haps.
> >
> > I have also tested the same drive on the same machine using Artix= Linux
> > and the drive stays spinned down, even when fully mounted using Z= FS.
> >
> > I have used "top -s 0.1" in order to see if I can get a= glimpse at
> > something which might run on FreeBSD, but nothing is started.
> >
> > What has changed from 14.3 to 15 that might cause this annoying > > behavior? How do I track down what's spinning up my drive? >
>
> I have a dtrace thing that can find all the commands being sent.
>
> But before i go to the hassle.. what happens if you set kern.cam.da.po= ll_period=3D0?

It's the same, nothing changes.

OK.= So it's not the media polling code. I'll see if my camio=C2=A0code= is in shape to
share. What's your level of comfort using exp= erimental code you might have to
tinker with a little bit?
<= div>
Warner=C2=A0
--00000000000047dcb006462d79ad--