Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4101C433EF for ; Wed, 8 Sep 2021 13:37:44 +0000 (UTC) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2C83060295 for ; Wed, 8 Sep 2021 13:37:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2C83060295 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.linux.it Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 5AE323C92DE for ; Wed, 8 Sep 2021 15:37:42 +0200 (CEST) Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [217.194.8.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id C52753C22CB for ; Wed, 8 Sep 2021 15:37:33 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-7.smtp.seeweb.it (Postfix) with ESMTPS id 272E22009F3 for ; Wed, 8 Sep 2021 15:37:32 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 334222228A; Wed, 8 Sep 2021 13:37:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1631108252; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+lqU27cfpoURtmstrKespcjdB6Jv9nc5XDw5QyLikZk=; b=h25SeI3bZwr2OrZENERdGLo50nXQg8sDlFOCHjHVlBQBu4MD07XCAnC0zBmpmloW6xpd3o 3enna/vED5f1APKfgD36D+LaLoEOkWZMuu6GI81JRcI1Pkvw0BZWBTdUqjs2ZylCuI0wGw O2qpY0x+RriTG2wJ87D30CtMLm8U6k4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1631108252; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+lqU27cfpoURtmstrKespcjdB6Jv9nc5XDw5QyLikZk=; b=wEqGAFdAJTrT3SA9hLEDxMuuqLaaH6p/aNI2EMnAaST1srrs/wRgNC5d87lzhE2tIeuUDZ kBHkLC6XEqtX6aAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 17D8B13CE2; Wed, 8 Sep 2021 13:37:32 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id DzWWA5y8OGHXBAAAMHmgww (envelope-from ); Wed, 08 Sep 2021 13:37:32 +0000 Date: Wed, 8 Sep 2021 15:37:45 +0200 From: Cyril Hrubis To: Krzysztof Kozlowski Message-ID: References: <20210624132226.84611-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210624132226.84611-1-krzysztof.kozlowski@canonical.com> X-Virus-Scanned: clamav-milter 0.102.4 at in-7.smtp.seeweb.it X-Virus-Status: Clean Subject: Re: [LTP] [PATCH] lib: memutils: don't pollute entire system memory to avoid OoM X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ltp@lists.linux.it Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ltp-bounces+ltp=archiver.kernel.org@lists.linux.it Sender: "ltp" Message-ID: <20210908133745.cFyZAeDPHOuQAWKU6EqxwRgLWvL-sjR3rzRlfh3ShlQ@z> Hi! I guess that this is another bug that should be fixed before the release. I still think that the memory pollution is a best effort operation and that we should be more conservative with the reserve. I would go for a few percents of the free memory just to be extra sure that we do not cause memory pressure. If we go for 2% we will add following; safety = MAX(safety, info.freeram / 50); Also it looks like info.freeram is the same as MemFree: from /proc/meminfo, I guess that this is not wrong, since memory that have been used in buffers is dirty enough for our case. -- Cyril Hrubis chrubis@suse.cz -- Mailing list info: https://lists.linux.it/listinfo/ltp