Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4583175ybl; Wed, 22 Jan 2020 00:30:02 -0800 (PST) X-Google-Smtp-Source: APXvYqxu1k2tONiyPLJPU/nAaOuXBHac6RMipe/sKOMkGkdz6J8/mU1mfkpxF66MUqMIuBOlju0H X-Received: by 2002:a9d:6c92:: with SMTP id c18mr6667065otr.157.1579681802125; Wed, 22 Jan 2020 00:30:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579681802; cv=none; d=google.com; s=arc-20160816; b=KrPv/JBy3yO0U0Z9/+t7G3bgO938rcjca5FoBBhGkUYNqQP1+1LwpcblNdi7dd3rwz OF/emh8M8mZuDIWokk//Zj18i8rjj8iVhAofK4LdPU5K590uKeZ290CiIrB74Ai/rv1t bulBbFB2r6/Tdzrl7z4SFYyIB5T0r5szkjCPfEZ/fU8j+nxNiFvLoOQWLFYlM3LC1SIz 3QACB3s1v2KsPJxC4FdJiRVLbgO+4odeaWWtJP0oAlvcnLe/Id5KPvT7PUOH0nS0t/U5 nNFDSqe5NEB4zNfoYZLkur4+0Zja+EjbhzwE8mC0uD7wiEZcivAs4ou9P5jbJHxv6zWZ rs8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=OjyMDyxydu3xzK47l5IL4JFwN0Gu9GPTlFI5eNh0tK4=; b=rUJur718nqKRd5IZUkFjAsevhMEgBmwVnyIUgUHAAdaRBIUEYzrXP8Jl0/VA9Dq3ql x7UqvrXVyVHEcUw1gCYIL0tTLuuxGtVttBN9HBPA6djbix8r2NJoU4/GqNRTmVIIE3Ug Hl3C0TrKJ8ZL6tf4Lbzxm4uR4go2IGnvBexUk+IICW0btYn4zmth4M2F7JjEsTIEkP6o yl3OalXXGPSOdlJhOkA4RUvnRXgNouH1HzUZdlu2i6pEE4m29hTnp3ojIpQt2wN8Xl0Q 56AQDoh8UF6SAsFjnLsNX+8FCI603w0gWYRsRMRdrV6A1lbmDJR+zlxWEtexg1t72kWQ GnkA== 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 x5si21356813oic.72.2020.01.22.00.29.50; Wed, 22 Jan 2020 00:30:02 -0800 (PST) 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 S1726094AbgAVI26 (ORCPT + 99 others); Wed, 22 Jan 2020 03:28:58 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:40442 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725868AbgAVI25 (ORCPT ); Wed, 22 Jan 2020 03:28:57 -0500 Received: by mail-wm1-f66.google.com with SMTP id t14so6170311wmi.5; 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=TfVh0mErf4YFTX7d1lW86D2wEgClcnHKnMFC4DKeKi8h3HjiCGY33neJmUJEfAos7/ 984P+N/EPPeYA5Jy1yQkHWy5bOdpJwpOm66N9XmADAOTWmXcDGVVLWSAf8bLeEUsLaPa uA8oXjNMrDdFLt4WqSi2L0PU8f/I/N0UHKWUwvQkC97FwyVRhScuh3IA/ilNh2q2E8Pw zgnLa4IcXMiu9DI+i4kjYsSEyTobGAoa82Ak/IbHRSw9DxJnUGhrVZWAgOvRpGdkXLVG eypZP1Qg+hkAfZOzoZN31xsjPOvzcl7mQbMSZzvpsYnmro2lZRqG2og1xLZEsDruqmPK 7H+A== X-Gm-Message-State: APjAAAWmcVML4xKGgzWnc6cCQ2BDCvwoUwS81sKNaZJUoMaYzgJzoSf5 iL6NggFbh2h9iG5Qdou7/4w= 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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