From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:49933) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j5sMV-0000dX-5d for guix-patches@gnu.org; Sun, 23 Feb 2020 09:36:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j5sMU-0008B5-1E for guix-patches@gnu.org; Sun, 23 Feb 2020 09:36:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:44588) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j5sMT-0008Aq-UN for guix-patches@gnu.org; Sun, 23 Feb 2020 09:36:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j5sMT-0004yH-R5 for guix-patches@gnu.org; Sun, 23 Feb 2020 09:36:01 -0500 Subject: [bug#39734] [PATCH] scripts: Emit GC hint if free space is lower than absolute and relative threshold. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20200222104653.1324-1-mail@ambrevar.xyz> <874kvizxi6.fsf@gnu.org> <87tv3ig8bc.fsf@ambrevar.xyz> <87h7zhttk1.fsf@gnu.org> <874kvhfrqk.fsf@ambrevar.xyz> Date: Sun, 23 Feb 2020 15:34:55 +0100 In-Reply-To: <874kvhfrqk.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Sun, 23 Feb 2020 12:49:39 +0100") Message-ID: <875zfxtlrk.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Pierre Neidhardt Cc: 39734@debbugs.gnu.org Pierre Neidhardt skribis: > Ludovic Court=C3=A8s writes: > >> So how about this: >> >> We check for a trailing =E2=80=9C%=E2=80=9D, and if there=E2=80=99s on= e, assume it=E2=80=99s a percentage. >> >> Else, call =E2=80=98size->number=E2=80=99. If we get an integer < 100= , assume it=E2=80=99s a >> percentage, otherwise assume it=E2=80=99s an absolute size in bytes. >> >> How does that sound? > > I think there is a misunderstanding. If we have only _one_ threshold, > there is no way to set sane defaults for both big and small partitions. Oh, I must have misunderstood. You mean you=E2=80=99d want to be able to set both an absolute threshold an= d a relative threshold? (Why =E2=80=9Cbig and small=E2=80=9D actually?) Why not, but it seems to me we might be going overboard for something that=E2=80=99s just meant as a hint to help people learn about =E2=80=98gui= x gc=E2=80=99. :-) Ludo=E2=80=99.