Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1284566

Re: [PATCH v2 00/13] MADV_FREE support

Path csiph.com!news.mixmin.net!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From Daniel Micay <danielmicay@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 00/13] MADV_FREE support
Date Sat, 05 Dec 2015 17:00:01 +0100
Message-ID <qCnpD-2Wd-7@gated-at.bofh.it> (permalink)
References <qqV3I-27u-7@gated-at.bofh.it> <qCj2F-kX-3@gated-at.bofh.it>
X-Original-To Pavel Machek <pavel@ucw.cz>, Minchan Kim <minchan@kernel.org>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type; bh=5jSPFjmEMkGJktvSURyZ+I7PmYrKjx9gZOiu0ZWhXNg=; b=xz3sxom3zizDFgE53pLtuTcjaU4S65Y8rmo/s8MUn+1mJIzxkog/O0f9W+t9fMfI5e h3MP/2tU7ust9KdJxoJoXxsct9LEF9+pi7Vz/z2HrFEyEdHT8HPmtdZY0LFis4zEgPgg KqRgYtxfhaeAOG63GcuiuyOrTTNpfIFe/6qFhfR+bf5dxVQXXiF5bN+UKJl2UjagfrUO m5kurY1mkz0ax+IZIVXLcrUk+8idQA+UP0KVG0uQvPGuSfTEKzYsUrs2/hMUYbVNk1Qw j4DgyTHPj2q75yUAaP05UsPPCqY+8VB4NNsOYRargTQVE2wv05EIrtuFuBWtmqPxX3BQ XYiQ==
X-Received by 10.140.173.65 with SMTP id t62mr27995038qht.96.1449330723770; Sat, 05 Dec 2015 07:52:03 -0800 (PST)
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0
MIME-Version 1.0
Content-Type multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="25AEtqoWBXCvAxgbRSFnbrHf3lJq2GSlb"
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 55
Organization linux.* mail to news gateway
X-Original-Cc Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Michael Kerrisk <mtk.manpages@gmail.com>, linux-api@vger.kernel.org, Hugh Dickins <hughd@google.com>, Johannes Weiner <hannes@cmpxchg.org>, Rik van Riel <riel@redhat.com>, Mel Gorman <mgorman@suse.de>, KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>, Jason Evans <je@fb.com>, "Kirill A. Shutemov" <kirill@shutemov.name>, Shaohua Li <shli@kernel.org>, Michal Hocko <mhocko@suse.cz>, yalin.wang2010@gmail.com
X-Original-Date Sat, 5 Dec 2015 10:51:58 -0500
X-Original-Message-ID <5663081E.4010205@gmail.com>
X-Original-References <1446600367-7976-1-git-send-email-minchan@kernel.org> <20151205111042.GA11598@amd>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1284566

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On 05/12/15 06:10 AM, Pavel Machek wrote:
> On Wed 2015-11-04 10:25:54, Minchan Kim wrote:
>> MADV_FREE is on linux-next so long time. The reason was two, I think.
>>
>> 1. MADV_FREE code on reclaim path was really mess.
> 
> Could you explain what MADV_FREE does?
> 
> Comment in code says 'free the page only when there's memory
> pressure'. So I mark my caches MADV_FREE, no memory pressure, I can
> keep using it? And if there's memory pressure, what happens? I get
> zeros? SIGSEGV?

You get zeroes. It's not designed for that use case right now. It's for
malloc implementations to use internally. There would need to be a new
feature like MADV_FREE_UNDO for it to be usable for caches and it may
make more sense for that to be a separate feature entirely, i.e. have a
different flag for marking too (not sure) since it wouldn't need to
worry about whether stuff is touched.

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2 00/13] MADV_FREE support Pavel Machek <pavel@ucw.cz> - 2015-12-05 12:20 +0100
  Re: [PATCH v2 00/13] MADV_FREE support Daniel Micay <danielmicay@gmail.com> - 2015-12-05 17:00 +0100

csiph-web