Path: csiph.com!1.us.feeder.erje.net!2.us.feeder.erje.net!feeder.erje.net!2.eu.feeder.erje.net!news.unit0.net!news.mixmin.net!aioe.org!news.servidellagleba.it!bofh.it!news.nic.it!robomod From: Dmitry Safonov <0x7f454c46@gmail.com> Newsgroups: linux.kernel Subject: Re: [PATCHv3 33/33] mm, x86: introduce PR_SET_MAX_VADDR and PR_GET_MAX_VADDR Date: Mon, 06 Mar 2017 15:10:02 +0100 Message-ID: References: X-Original-To: "Kirill A. Shutemov" Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=z3crjOzsOQvRHP1b8QMdYIVTMgFbjkqOZl+/v4C36mY=; b=NZFFi0uk3DOIzhHvLn7S4QbBolM9sbR5TWhqn6DxIdSh4KhsfNDNoXsi2KoBslql91 yO+ib/mqDOKZqtZHdD6jBd85LjR3E8Ks4+9ztdE0FtnJ5sKjaC1dOmVbpcwSU/agcdIT sSwQFwje/dJCG2IreHP14YKLmnQak1pcbbVtJrjkqbBBvBgTkVbS26s5f1VwIQQ1Ngot ymgkbbW3GV4HwLuq2GDAE82gznsF5t7BA+WMTGDg7WSQfq4T+gq3sN/2MJQqXeXxoyYB vVmDngIC4RKnB0B/bjliQv1kRR69yeRE0aNCpEbCheQsxoim7IzGYio4J6slk0X6Lh29 3NtA== X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=z3crjOzsOQvRHP1b8QMdYIVTMgFbjkqOZl+/v4C36mY=; b=efUFQOhVIHAiM+0JTvnO+d/c4KGKTJcGNiEkbP9QMHiQCAASmyA6Zn2NBE2SWsDTAf YcWFyYv1fQd26hDUXsyXh4i3uoOoamT2Xecr89ja9QD5tr7m0I4+A1ZES5CRrR3bIRH/ FAmrGvOafHf6niX0oagsw21Ab3EEdv0hryzU/ZnjY1Wh5ulwJnKsjHv3glwRUABOfcMd LiA8jm4w3LuBwfJpkTLcAKhckN3Il3R4ITEYyXs2kdfAo+vZLdhFWvJdB+/dlAXveYM6 SkpVdb0xH/jetcHF3sqaKT8KfMHRmI/wyvyP2rC3BvNdtGAb9lcxXyfpFGu/QuyGYfGs Be8w== X-Gm-Message-State: AMke39lzAIn/44xMjl6qOMm3zNHUwwOO+TsexKfqLvbqcnhtlibbE7Zqm7TTf8oJuaTW941y4xveP3KlB/u7Iw== X-Received: by 10.28.35.66 with SMTP id j63mr4589603wmj.84.1488808849000; Mon, 06 Mar 2017 06:00:49 -0800 (PST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: robomod@news.nic.it List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Approved: robomod@news.nic.it Lines: 51 Organization: linux.* mail to news gateway X-Original-Cc: Andy Lutomirski , "Kirill A. Shutemov" , Dmitry Safonov , Linus Torvalds , Andrew Morton , X86 ML , Thomas Gleixner , Ingo Molnar , Arnd Bergmann , "H. Peter Anvin" , Andi Kleen , Dave Hansen , linux-arch , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Catalin Marinas , Linux API X-Original-Date: Mon, 6 Mar 2017 17:00:28 +0300 X-Original-Message-ID: X-Original-References: <20170217141328.164563-1-kirill.shutemov@linux.intel.com> <20170217141328.164563-34-kirill.shutemov@linux.intel.com> <20170221124217.GB13174@node.shutemov.name> X-Original-Sender: linux-kernel-owner@vger.kernel.org Xref: csiph.com linux.kernel:1593363 2017-02-21 15:42 GMT+03:00 Kirill A. Shutemov : > On Tue, Feb 21, 2017 at 02:54:20PM +0300, Dmitry Safonov wrote: >> 2017-02-17 19:50 GMT+03:00 Andy Lutomirski : >> > On Fri, Feb 17, 2017 at 6:13 AM, Kirill A. Shutemov >> > wrote: >> >> This patch introduces two new prctl(2) handles to manage maximum virtual >> >> address available to userspace to map. >> ... >> > Anyway, can you and Dmitry try to reconcile your patches? >> >> So, how can I help that? >> Is there the patch's version, on which I could rebase? >> Here are BTW the last patches, which I will resend with trivial ifdef-fixup >> after the merge window: >> http://marc.info/?i=20170214183621.2537-1-dsafonov%20()%20virtuozzo%20!%20com > > Could you check if this patch collides with anything you do: > > http://lkml.kernel.org/r/20170220131515.GA9502@node.shutemov.name Ok, sorry for the late reply - it was the merge window anyway and I've got urgent work to do. Let's see: I'll need minor merge fixup here: >-#define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3)) >+#define TASK_UNMAPPED_BASE (PAGE_ALIGN(DEFAULT_MAP_WINDOW / 3)) while in my patches: >+#define __TASK_UNMAPPED_BASE(task_size) (PAGE_ALIGN(task_size / 3)) >+#define TASK_UNMAPPED_BASE __TASK_UNMAPPED_BASE(TASK_SIZE) This should be just fine with my changes: >- info.high_limit = end; >+ info.high_limit = min(end, DEFAULT_MAP_WINDOW); This will need another minor fixup: >-#define MAX_GAP (TASK_SIZE/6*5) >+#define MAX_GAP (DEFAULT_MAP_WINDOW/6*5) I've moved it from macro to mmap_base() as local var, which depends on task_size parameter. That's all, as far as I can see at this moment. Does not seems hard to fix. So I suggest sending patches sets in parallel, the second accepted will rebase the set. Is it convenient for you? If you have/will have some questions about my patches, I'll be open to answer. -- Dmitry