From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id C86D36EC58; Mon, 2 Aug 2021 18:12:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C86D36EC58 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1627917160; bh=yLGPA5WBUznpNYw+uxI3hgNfCmG2sTpNlKkV3O2hvN4=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=OfbAtcYi4ucyii7Wm244AE7ykGw6wN9zT/NnDOW/ekY9UVqRgfJFbubrJRUi8VfTW liXXGc11gIZezn1cvBS+f45LVDA4BDpgXctB028du+J3d4b0fRHfIddPfpgc8xL24a HmyFggafS4twk4erC3yW/s970+EPXZjD/u4+n5RA= Received: from smtp51.i.mail.ru (smtp51.i.mail.ru [94.100.177.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 868E86EC58 for ; Mon, 2 Aug 2021 18:12:39 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 868E86EC58 Received: by smtp51.i.mail.ru with esmtpa (envelope-from ) id 1mAZcM-0001v3-PS; Mon, 02 Aug 2021 18:12:39 +0300 Date: Mon, 2 Aug 2021 18:11:25 +0300 To: Igor Munkin Message-ID: References: <20210727152323.GS27855@tarantool.org> <20210801103633.GX27855@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210801103633.GX27855@tarantool.org> X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD941C43E597735A9C3104FC76DFAAAAF7DA068FE323FAC4379182A05F53808504046B1504E52B37AA53989A15DE603D269CE38CE03338ABCDDD852E5EED5BEFEA1 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7BC4E2FB7ADD5BA16EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637782358EF9635990EEA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38BBCA57AF85F7723F2CCBAB6F0F2C6F672800B1286E8308C21CC7F00164DA146DAFE8445B8C89999728AA50765F7900637D0FEED2715E18529389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8A9FF340AA05FB58CF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8BDCE939D40DBB93CA75ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A5857F60F32EC85742D993B0053720A98EE68066951D88ACE1D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA751B940EDA0DFB0535410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34AA13E2DDB906786285460155C40AA80B690342F1ADE666DD3F0752C9E0D3F9651C2563C9E47052E91D7E09C32AA3244CE1A9B938ED1DB02324AA0548F6CB0E70FE8DA44ABE2443F7FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj9N286KAyvN5EfZjAM1ltvQ== X-Mailru-Sender: 3B9A0136629DC91206CBC582EFEF4CB4F15BB51D1306376414FCF85496A7C87DDD02C8119DC19B26F2400F607609286E924004A7DEC283833C7120B22964430C52B393F8C72A41A89437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 2/2] Linux/ARM64: Make mremap() non-moving due to VA space woes. X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Igor, On 01.08.21, Igor Munkin wrote: > Sergey, > > Thanks for the fixes! LGTM, except the single typo. > > On 28.07.21, Sergey Kaplun wrote: > > > > > > > The new commit message is the following: > > > > =================================================================== > > Linux/ARM64: Make mremap() non-moving due to VA space woes. > > > > This reduces overall performance on ARM64, but we have no choice. > > Linux kernel default userspace VA is 48 bit, but we'd need 47 bit. > > mremap() ignores address hints due to a kernel API issue. The mapping > > may move to an undesired address which will cause an assert or crash. > > > > Reported by Raymond W. Ko. > > > > (cherry picked from commit 67dbec82f4f05a416a78a560a726553beaa7a223) > > > > 47-bit VA space is required by LuaJIT for keeping a GC object pointer in > > TValue. In case of huge blobs that are mapped directly, `mremap()` may > > move the chunk out of 47-bit range of VA space on ARM64. `mremap()` > > accepts the fifth argument (new address hint) only with MREMAP_FIXED > > flag. In that case it unmaps any other mapping to specified address. > > > > To avoid this behaviour this patch restricts `mremap()` to relocate > > the mapping to a new virtual address by set CALL_MREMAP_NOMOVE flag > > Typo: s/set/setting/. Fixed. > > > instead of CALL_MREMAP_MAYMOVE for arm64 architecture. > > > > Sergey Kaplun: > > * added the description and the test for the problem > > > > Needed for tarantool/tarantool#6154 > > Minor: Why #5629 is not mentioned? Added. Branch is force-pushed. > > > =================================================================== > > > > > > > > > -- > > Best regards, > > Sergey Kaplun > > -- > Best regards, > IM -- Best regards, Sergey Kaplun