From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x92c.google.com (mail-ua1-x92c.google.com [IPv6:2607:f8b0:4864:20::92c]) by sourceware.org (Postfix) with ESMTPS id 5A5133858CD1 for ; Thu, 1 Feb 2024 01:27:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5A5133858CD1 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=rodriguez.im Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cristianrodriguez.net ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5A5133858CD1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::92c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706750826; cv=none; b=IHKCz6YoO0D8fYVdnsfdrlWUzA6LK6uy4AjZ544NRcv5Qk9Ze56e2p3lhIALYHbbM0elSY6/48MB0AL3N5Wxbevo1fGRwv7okh23NMQkr8NrXx0ECBTsh7h0kjK37qEUd78Dt7rA6Z8LGEbh7g8nOJCROEl4pq9m3JzJQKQVG2Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706750826; c=relaxed/simple; bh=OQGJuyC7Ca573ZQjrs2hEmZBEGzbMiVXTKFeg2N+7Ww=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=ejT+OHuYBH0HlDtDkTPgAIdvY7U6Tx3GTXNATvv8EoCfM+MINDJRNdtNtMbvZhSGY3PxUfLT5luyIGQEsl55DDs7lBV3io3E9pLF9xRv/1Dm59USzZFPXzMSMlJddZsC4uS3XcPjzsyxDMs4VFBR69Zo6eKWh+4Ac9toMVts5OQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ua1-x92c.google.com with SMTP id a1e0cc1a2514c-7d61b1c3da1so2977241.0 for ; Wed, 31 Jan 2024 17:27:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rodriguez.im; s=google; t=1706750822; x=1707355622; darn=sourceware.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=tLT8W3zL+KAqcrBnHFUF8B6fHm2oVydJGIkJu0SA6as=; b=htvfudD77faPoB+I9y4mqnkPEy2vwgZAJWabcPV5hmLfhSSBRVlWoh5OFxL559mnMn Oo1x6XW4zZiXCXwHEF8Dngzeo0YfxAFQMFtenSxQzf5PdR3RLfFjdurbTwWNCZ32wATb UYZXubxiWeYxuDbMzxANtsTy0j5+ugqHZ4vZ4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706750822; x=1707355622; 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=tLT8W3zL+KAqcrBnHFUF8B6fHm2oVydJGIkJu0SA6as=; b=dImWu7M+bKsHaVJJnfL40QVhIkOu+f9aWML4LhzRySblfE6wwqOW4syLYmtOJOYk6T CUjzoMkROO1n6xUxxa6lD1cEZemugzb/qDpgKlsw3hrve5jTs+f+jxLUMJoXsGZYyKGU dK3lrXm89O+jfFaoDVNJxG01yz+MvKatacdKMlqsjoRfd1mY6XiG+2d2KlUOP2cLx0Nw sE9hkp0PxRDjGvjAeTdkdDJqjdVbeLlICcY3mi7n26oSTcJs4dRJrZDKlr2J7nZg223h fwgjBR8GCm9S/JXm3PUULWSAaYEnmevfY/MZm1DeOMMzwArXta7cOwSBCGeP610D+Taz 1D9A== X-Gm-Message-State: AOJu0Yw7WAPcmLea5wwxgoOpzSsgto2gwZHx/4rOMjpc6km8ErJ+iL7u asb2Nt4cg8lPtiYWGWybchfTPlO4oIWgEt+8Moy4qhG19V4+ggf+PWWHRsjvWrmYzk83nJEo4un 8rcA7hP4IUYr903r28X+sr16cKiQa78Vjw62I X-Google-Smtp-Source: AGHT+IFr7ujKLWTiIeGU6ehmK/9PdBUEli+QbRvMD8eKo6Qr1/AG4Iy/ej+vAPmXvzlpo+ILVYTH/OzwlrrJljr7N5Q= X-Received: by 2002:a05:6122:caa:b0:4b7:32ac:f4e5 with SMTP id ba42-20020a0561220caa00b004b732acf4e5mr1370177vkb.1.1706750822370; Wed, 31 Jan 2024 17:27:02 -0800 (PST) MIME-Version: 1.0 References: <20230420172436.2013698-1-adhemerval.zanella@linaro.org> <4115d7fd-d7a7-cdb1-3833-daf45186480f@linaro.org> <967b94b4-d819-278f-1782-6b758d0841b6@linaro.org> <877cjqym2n.fsf@oldenburg.str.redhat.com> <87aa8879-8590-4cb1-9ad1-563c09707356@linaro.org> In-Reply-To: From: =?UTF-8?Q?Cristian_Rodr=C3=ADguez?= Date: Wed, 31 Jan 2024 22:26:51 -0300 Message-ID: Subject: Re: [PATCH] nptl: Disable THP on thread stack if it incurs in large RSS usage To: Adhemerval Zanella Netto Cc: Florian Weimer , Wilco Dijkstra , "libc-alpha@sourceware.org" , Cupertino Miranda Content-Type: multipart/alternative; boundary="0000000000007cee82061047e4d8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --0000000000007cee82061047e4d8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jan 31, 2024 at 12:18=E2=80=AFPM Cristian Rodr=C3=ADguez wrote: > > > On Wed, Jan 31, 2024 at 8:30=E2=80=AFAM Adhemerval Zanella Netto < > adhemerval.zanella@linaro.org> wrote: > >> >> >> On 31/01/24 04:54, Florian Weimer wrote: >> > * Cristian Rodr=C3=ADguez: >> > >> >> On Tue, May 23, 2023 at 5:48=E2=80=AFAM Wilco Dijkstra via Libc-alpha= < >> libc-alpha@sourceware.org> >> >> wrote: >> >> >> >>> However even switching off THP for all small stacks (eg. default size >> or smaller) >> >>> would avoid the random use of THP without needing to set the tunable. >> >>> >> >>> Cheers, >> >>> Wilco >> >> >> >> >> >> Didn't found the exact message to reply.. but this one is close >> enough. MAP_STACK implies no >> >> transparent hugepages since linux kernel commit >> >> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commi= t/?id=3Dc4608d1bf7c6536d1a3d233eb21e50678681564e >> > >> > It's an odd choice for fixing the regression. I commented on the >> > linux-mm thread. It's also surprising to see such changes being made >> > without larger discussion. >> >> Do you have a link for this discussion? >> > > Doesn't this also imply that the kernel expects the MAP_GROWSDOWN flag > #if _STACK_GROWS_DOWN to do the right thing elsewhere ? > > > Older versions will need MAP_GROWS* to have identical THP behaviour than earilier kernel versions it seems to me. --0000000000007cee82061047e4d8--