From nobody Fri Feb 16 04:33:03 2024 X-Original-To: freebsd-questions@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 4TbfFD4R16z59fSc; Fri, 16 Feb 2024 04:33:20 +0000 (UTC) (envelope-from kob6558@gmail.com) Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TbfFD27ckz4RMV; Fri, 16 Feb 2024 04:33:20 +0000 (UTC) (envelope-from kob6558@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yb1-xb29.google.com with SMTP id 3f1490d57ef6-dcc80d6004bso1655624276.0; Thu, 15 Feb 2024 20:33:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708057999; x=1708662799; 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=8yCeuJrWqNKgA2rPgGqaPMjwY5khTC5oIlmlf6Ql+UI=; b=mxpBZyoYHQWUqh+q+oogOhH+mJww8qa64LYOKvNjmpaQqB4LDZeHAgZbUmh/pWz7pS p6WWXWMNBM2IN6WfiZcdFrRxzwl/VVEWuK4XPeweSDfxxGsDZiHcftTCVhuB+J3gJmVY IUH0pyWHx1j3dyMW+m/W118K2DINOXrgCTiPb+ZtpWQ+m3UMmCHDiguFEpt+DFai3JLN 9JR2Ed5StZEqMekLJl5JMO9cGO2EwAaUx28IRuESt7YXlMxLdc+LojGyqYiN+FePlupK DhwP9zb6+ZrBHdeNj5Y+0BjOZybIlS3Snm9FpFvzxBT+0aNw+zvjxjr0jr/Fa7/+AsmW 6KuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708057999; x=1708662799; 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=8yCeuJrWqNKgA2rPgGqaPMjwY5khTC5oIlmlf6Ql+UI=; b=exJMZzweBLey2Rob8u4k8b1i22SLRtFgppjEDJMIWtEURm0lb0ZiAq25FkhB4e6ntS ByZfmWIy+0reuYtZlam9rVRdXQC0TzpQiJpt9CEtdCQTlavbLoC74zDd+GXlOCbtfkjg W83lWtr6hOyNvxGewmkhIJAQgjcNd+Sq0GoFmAJ9KTuMONJ0nsKYR0PTM9p3DVQ5PLDR 4cTTKZNjSgX6ncpfCOLye9kjWLdzsqRvrwXeZQ9xbl797cxxI5P8vVS2sHexHJpPe2BW kwbmhZFlXD1+d2IXjZtxz83u3gCApVhckeYBjjqVHx+Nhd1dOxyKJ3TFa4UyMx9TaqLf 0H3w== X-Forwarded-Encrypted: i=1; AJvYcCUFDU8rERg9qCnZuj3+pWaI4dN8ncow2L2elhRB31YeeH/K80jeSybv9kNSxanX/7DoFklsTy6q7TYf/1qC8+6pqciCdkk10w== X-Gm-Message-State: AOJu0YwTOn0ABeIteKlL4jMHVH5Pe5wae0SdyCOfFT2NXtAO3BOzbmBU 0QPR1pfO2OPMeXO8byRMceT84+vf56f2iS1N3xrUUbm/Y1wgqCjb1GJtl+/wsaW5OMv+JUxVnOw 5eq84TAQpi7ZZ57P1yfdlGHAGifg8FvM7 X-Google-Smtp-Source: AGHT+IEFcyEqIxaWtv+qX1PAphHF8UZ6AppG4jOcuNqMel+Xnblk0xdG12SFbUS4SKM4Q+M2ehLOVOxLn3yt42YDuQk= X-Received: by 2002:a05:6902:e0f:b0:dcc:417f:a85c with SMTP id df15-20020a0569020e0f00b00dcc417fa85cmr4087781ybb.50.1708057999145; Thu, 15 Feb 2024 20:33:19 -0800 (PST) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Kevin Oberman Date: Thu, 15 Feb 2024 20:33:03 -0800 Message-ID: Subject: Re: newfs TRIM flag device support To: Ordinary Bit Cc: "freebsd-questions@FreeBSD.org" , "freebsd-arm@freebsd.org" Content-Type: multipart/alternative; boundary="0000000000004b7edd0611783ede" X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4TbfFD27ckz4RMV X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] --0000000000004b7edd0611783ede Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Feb 15, 2024 at 7:19=E2=80=AFPM Ordinary Bit wrote: > > Hi, > > I'm reading the newfs manual https://man.freebsd.org/cgi/man.cgi?newfs(8) > to be able to know about the TRIM flag. In the manual under -t parameter, > it mentioned about "underlying device support", what exactly is this > device? Is it the host (for example, Raspberry Pi SD/eMMC host reader) or > the SD/eMMC card (controller) or both? > > *-t* Turn on the TRIM enable flag. If enabled, and if the u= nderly- > ing device supports the BIO_DELETE command, the file system > will send a delete request to the underlying device for each > freed block. The trim enable flag is typically set for flash- > memory devices to reduce write amplification which reduces wear > on write-limited flash-memory and often improves long-term per- > formance. Thinly provisioned storage also benefits by return- > ing unused blocks to the global pool. > > BR, > orbit > > TRIM is for SSDs. It is tied to the drive, but the controller or system. I think Linux enables it automatically, but I'm not sure. In the context of the description above, the drive is the device. --=20 Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 --0000000000004b7edd0611783ede Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Feb 15, 2024 at 7:19=E2= =80=AFPM Ordinary Bit <ordinary= bit@proton.me> wrote:

Hi,<= /div>

I'm reading the newfs manual=C2=A0https://man.freebsd.org/cgi/man.cgi?newfs(8) to be able to know about the TRIM flag. In the manual under -t parameter= , it mentioned about "underlying device support", what exactly is= this device? Is it the host (for example, Raspberry Pi SD/eMMC host reader= ) or the SD/eMMC card (controller) or both?
=C2=A0 =C2=A0 =C2=A0 =C2=A0-t=C2=A0 =C2=
=A0 =C2=A0 Turn =C2=A0on	the TRIM enable	flag.=C2=A0 If enabled, and if the=
 underly-
	 =C2=A0 =C2=A0 =C2=A0 ing device supports the BIO_DELETE =C2=A0command, =
=C2=A0the =C2=A0file	system
	 =C2=A0 =C2=A0 =C2=A0 will =C2=A0send =C2=A0a =C2=A0delete request to	the =
underlying device for each
	 =C2=A0 =C2=A0 =C2=A0 freed block.=C2=A0 The trim enable flag is typically=
 set for	flash-
	 =C2=A0 =C2=A0 =C2=A0 memory devices to reduce	write amplification which r=
educes wear
	 =C2=A0 =C2=A0 =C2=A0 on write-limited	flash-memory and often improves	lon=
g-term per-
	 =C2=A0 =C2=A0 =C2=A0 formance. =C2=A0 Thinly provisioned storage also ben=
efits by return-
	 =C2=A0 =C2=A0 =C2=A0 ing unused blocks to the	global pool.

BR,
orbit


<= /div>
TRIM is for SSDs. It is tied to the drive, but the controlle= r or system. I think Linux enables it automatically, but I'm not sure. = In the context of the description above, the drive is the device.
=
--
Kevin Oberman, Part time kid herder and = retired Network Engineer
E-mail: rkoberman@gmail.com
PGP Fingerprint: D0= 3FB98AFA78E3B78C1694B318AB39EF1B055683
<= /div>
--0000000000004b7edd0611783ede--