From mboxrd@z Thu Jan 1 00:00:00 1970 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=-1.0 required=3.0 tests=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 5ECFCC2D0DB for ; Wed, 22 Jan 2020 08:28:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2AE3A24655 for ; Wed, 22 Jan 2020 08:28:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2AE3A24655 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B948A6B000A; Wed, 22 Jan 2020 03:28:57 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B44526B000C; Wed, 22 Jan 2020 03:28:57 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A5B126B000D; Wed, 22 Jan 2020 03:28:57 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0217.hostedemail.com [216.40.44.217]) by kanga.kvack.org (Postfix) with ESMTP id 8FF826B000A for ; Wed, 22 Jan 2020 03:28:57 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 420072478 for ; Wed, 22 Jan 2020 08:28:57 +0000 (UTC) X-FDA: 76404594714.08.pump44_6b39e0db21c20 X-HE-Tag: pump44_6b39e0db21c20 X-Filterd-Recvd-Size: 4321 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Wed, 22 Jan 2020 08:28:56 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id 20so6142865wmj.4 for ; Wed, 22 Jan 2020 00:28:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=OjyMDyxydu3xzK47l5IL4JFwN0Gu9GPTlFI5eNh0tK4=; b=nytY0oGmLdpuYd4P3K0B41HQ42Nx00TyIrzanzZZ3PBNR5iQidqXu55LM0Y0K7hfDI g1hAnjNidXTZGFA4URJMnbwy6dkpjXHJiwtSfkP1mq0inbalbQM9vx1EvVeSmJeeaR4X vPJi1G39pOK11UDc/bQZZTld9K5A50qkFOKm7mZp37rrIVqi6mucytkSwt0EGWVvGqnk irhPCQbF7+ee2ThW+dgjLIxdu3uCjpinXykZlqd6P5cfxXYsFQklMMyRtR+vh4cJkH28 3T/PCh27sOMUqmGt16wZv/d9YyTSWEJUjXpYIuVtO5Lcu0qbimMP0g/i/CJcd+h7UjGE 2zxg== X-Gm-Message-State: APjAAAW6pZlQmJOv/TGyRLdYvSQDcfqoCoMZonHwe+D2qOpNlRaP0Ft5 p9vEWEQRV5qbL+hR2Lm5WPhIGmsi X-Google-Smtp-Source: APXvYqyl9MEI/mLqEYXS87KMyO+cKj6FxWSn6kU7Om0uM+ETRt7A6T7GavirDfhHCLA256MnMRhzOA== X-Received: by 2002:a1c:1d02:: with SMTP id d2mr1688797wmd.185.1579681735851; Wed, 22 Jan 2020 00:28:55 -0800 (PST) Received: from localhost (ip-37-188-245-167.eurotel.cz. [37.188.245.167]) by smtp.gmail.com with ESMTPSA id o16sm3219887wmc.18.2020.01.22.00.28.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jan 2020 00:28:55 -0800 (PST) Date: Wed, 22 Jan 2020 09:28:53 +0100 From: Michal Hocko To: Minchan Kim Cc: sspatil@google.com, kirill@shutemov.name, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-api@vger.kernel.org, oleksandr@redhat.com, surenb@google.com, timmurray@google.com, dancol@google.com, sonnyrao@google.com, bgeffon@google.com, hannes@cmpxchg.org, shakeelb@google.com, joaodias@google.com, ktkhai@virtuozzo.com, christian.brauner@ubuntu.com, sjpark@amazon.de Subject: Re: [PATCH v2 2/5] mm: introduce external memory hinting API Message-ID: <20200122082853.GS29276@dhcp22.suse.cz> References: <20200116235953.163318-1-minchan@kernel.org> <20200116235953.163318-3-minchan@kernel.org> <20200117115225.GV19428@dhcp22.suse.cz> <20200117155837.bowyjpndfiym6cgs@box> <20200117173239.GB140922@google.com> <20200117212653.7uftw3lk35oykkmb@box> <20200119161431.GA94410@google.com> <20200120075825.GH18451@dhcp22.suse.cz> <20200121183212.GF140922@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200121183212.GF140922@google.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue 21-01-20 10:32:12, Minchan Kim wrote: > On Mon, Jan 20, 2020 at 08:58:25AM +0100, Michal Hocko wrote: [...] > > The interface really has to be robust to future potential usecases. > > I do understand your concern but for me, it's chicken and egg problem. > We usually do best effort to make something perfect as far as possible > but we also don't do over-engineering without real usecase from the > beginning. > > I already told you how we could synchronize among processes and potential > way to be extended Daniel suggested(That's why current API has extra field > for the cookie) even though we don't need it right now. If you can synchronize with the target task then you do not need a remote interface. Just use ptrace and you are done with it. > If you want to suggest the other way, please explain why your idea is > better and why we need it at this moment. I believe I have explained my concerns and why they matter. All you are saying is that you do not care because your particular usecase doesn't care. And that is a first signal of a future disaster when we end up with a broken and unfixable interface we have to maintain for ever. I will not go as far as to nack this but you should seriously think about other potential usecases and how they would work and what we are going to do when a first non-cooperative userspace memory management usecase materializes. -- Michal Hocko SUSE Labs