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 C2FE56EC58; Sun, 1 Aug 2021 14:00:29 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C2FE56EC58 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1627815629; bh=20M/Yqtg0uIR8Y/8/5ky2EgJ9bHmS+A6zjn+fWimeDM=; 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=JOxM2j77Wcm1Pn+mfpReIp+FezlqMcB1FIU6Uu6T4QTpPROxD1UM9pCrIGWAyCqRC Ro9/ijv0ftPG+JHh9U1EU2XkNML31x2roIYM0u83KFNKLmiH/RskENDLdAPhsHYZXK 8jDyARvKngfSyX2Yg8Rks/zDkFZaz8t6fGyhyfOo= Received: from smtpng2.i.mail.ru (smtpng2.i.mail.ru [94.100.179.3]) (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 65C606EC58 for ; Sun, 1 Aug 2021 14:00:11 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 65C606EC58 Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1mA9CU-0000Al-Hu; Sun, 01 Aug 2021 14:00:11 +0300 Date: Sun, 1 Aug 2021 13:36:33 +0300 To: Sergey Kaplun Message-ID: <20210801103633.GX27855@tarantool.org> References: <20210727152323.GS27855@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD941C43E597735A9C3104FC76DFAAAAF7DA068FE323FAC4379182A05F5380850403052B881D24DDD32BA672E9AC9D4E86B8E4CEB2E0B181806CA6652AA9A64B542 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7B3BECF8700137300EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637A521848D7B067A388638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8FAA8E8E0FB02BB5B1F915989F0CB320E117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC974A882099E279BDA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD1828451B159A507268D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6D0C9BB9AE6BD5D69089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A59BB48242930136AFFD8C6F28E83AD99AD40075DF3058DFE9D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA751B940EDA0DFB0535410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D342E8FEDBD32DECB6D9E376C532E6E70E9C1B76E1D7A4DA4D5F0FD509FEF727C7DC5B7F02F124E1D9C1D7E09C32AA3244C25F500565259EFC44339E83B12A95FF08A6D4CC6FBFAC251927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojMCfuYI4PrefYj7kipzcJww== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D1E3AACEEBAF73381D7ED326AAD4DB67EA7C8D0F45F857DBFE9F1EFEE2F478337FB559BB5D741EB964C8C2C849690F8E70A04DAD6CC59E33667EA787935ED9F1B 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: Igor Munkin via Tarantool-patches Reply-To: Igor Munkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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/. > 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? > =================================================================== > > > -- > Best regards, > Sergey Kaplun -- Best regards, IM