Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1114508ybi; Thu, 30 May 2019 11:49:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAdqeUQQ02hOTH9uaAPCiiaHxGEUBXGt8HKfp/Se3wmKr25saPErhpo/N9QvnDnYtHFkyq X-Received: by 2002:a17:90a:9bc4:: with SMTP id b4mr5109319pjw.100.1559242142837; Thu, 30 May 2019 11:49:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559242142; cv=none; d=google.com; s=arc-20160816; b=fFxVuItq54jMIqmHZSL/JhNvCejQYst6iBOrYJqqq6u7LgHCvmdDV3WU10s9mFzLpn KsMq82mH4KtJ1I5BOPZYS/oHP7OsDUcQo1qvTurQEZReJOAa6ldEPl/MJDazVatjqF4j n+VWBqQ5cuHMyvq2YGNhOngkS4OV41ISRg2PykKhX8SE+HKhJZ6FJYty0gNi/3kqURHn fbMUz9a1Ib5/M/Du9tOMgBAue9nF65fRy3eezv1g0vdmH5SDr/mM50YNAaYQOwBJlL4U OOrWIINQki5v0khczkDBa8GJn7LUpqhQPjKwCSRMo4bjWyu+jdctsiKyhLojOz1zTl53 W2Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=5Gt107Vtbqvi8jilyENgjygJpy+ZvOEaCBRdu81GjtU=; b=mmjnjcZxMD/X3gUUAULnUEp4OS8+8ajNX0JimAg1REFp10QK4I26leWKm4VfL+sAar mSHcn1UzXkNB9kz46y+uEGaX5FqRmiKQd1xExIrVnHQ2ySQ5io00JW9ZE8E+Gr328gJs /03rmLbHL433S6u6FUREGOJM5shQ9V5wH5P8Kn5LPhrOD6lzn6CRRfkdYbcWzRS1ESq5 BQ9TXBT91D9+zwK+2tR+ItyKiQHKA4j4lyFjrnL06KZdWxLYFQmBKCEL5ty458hjVoKY PmQdy7NBvw4QYAbUM0MTI40y7NxZHP9MCP3Kwn028QSJi4N2V5AE3tbdpkEczRHElR4G 62HQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x3si3627552pjv.49.2019.05.30.11.48.45; Thu, 30 May 2019 11:49:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726487AbfE3SrQ (ORCPT + 99 others); Thu, 30 May 2019 14:47:16 -0400 Received: from mx2.suse.de ([195.135.220.15]:49380 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726079AbfE3SrQ (ORCPT ); Thu, 30 May 2019 14:47:16 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 96A02AD35; Thu, 30 May 2019 18:47:14 +0000 (UTC) Date: Thu, 30 May 2019 20:47:13 +0200 From: Michal Hocko To: Minchan Kim Cc: Daniel Colascione , Andrew Morton , LKML , linux-mm , Johannes Weiner , Tim Murray , Joel Fernandes , Suren Baghdasaryan , Shakeel Butt , Sonny Rao , Brian Geffon , Linux API Subject: Re: [RFC 6/7] mm: extend process_madvise syscall to support vector arrary Message-ID: <20190530184713.GI6703@dhcp22.suse.cz> References: <20190521024820.GG10039@google.com> <20190521062421.GD32329@dhcp22.suse.cz> <20190521102613.GC219653@google.com> <20190521103726.GM32329@dhcp22.suse.cz> <20190527074940.GB6879@google.com> <20190529103352.GD18589@dhcp22.suse.cz> <20190530021748.GE229459@google.com> <20190530065755.GD6703@dhcp22.suse.cz> <20190530080214.GA159502@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190530080214.GA159502@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 30-05-19 17:02:14, Minchan Kim wrote: > On Thu, May 30, 2019 at 08:57:55AM +0200, Michal Hocko wrote: > > On Thu 30-05-19 11:17:48, Minchan Kim wrote: [...] > > > First time, I didn't think about atomicity about address range race > > > because MADV_COLD/PAGEOUT is not critical for the race. > > > However you raised the atomicity issue because people would extend > > > hints to destructive ones easily. I agree with that and that's why > > > we discussed how to guarantee the race and Daniel comes up with good idea. > > > > Just for the clarification, I didn't really mean atomicity but rather a > > _consistency_ (essentially time to check to time to use consistency). > > What do you mean by *consistency*? Could you elaborate it more? That you operate on the object you have got by some means. In other words that the range you want to call madvise on hasn't been remapped/replaced by a different mmap operation. -- Michal Hocko SUSE Labs