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 40A836EC58; Sun, 1 Aug 2021 19:59:05 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 40A836EC58 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1627837145; bh=IEA6DHYzdDvmY6Owk4J/ncRNLuuR6XlUwnwgH/uHqZQ=; h=In-Reply-To:Date:References:To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Ry2iBJutwuL2kn1hW6xe8+lnJ5xa7xX2BW61+ic/0oU71zXxK2vz/yZS2N18YHlFN JAgJhRsmOS0Wl8/+7I1nLietZQp7kfxgFc0489juYScrReu0ALGNbvppkuDQEdYuos Ow88EY70PvjWo4eC7G4sRfEh5kENnJ4RyKxV7NmY= Received: from smtp46.i.mail.ru (smtp46.i.mail.ru [94.100.177.106]) (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 572236EC58 for ; Sun, 1 Aug 2021 19:59:03 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 572236EC58 Received: by smtp46.i.mail.ru with esmtpa (envelope-from ) id 1mAEnm-0007zv-Fd; Sun, 01 Aug 2021 19:59:02 +0300 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) In-Reply-To: <20210801103633.GX27855@tarantool.org> Date: Sun, 1 Aug 2021 19:59:01 +0300 Content-Transfer-Encoding: 7bit Message-Id: References: <20210727152323.GS27855@tarantool.org> <20210801103633.GX27855@tarantool.org> To: Igor Munkin X-Mailer: Apple Mail (2.3654.100.0.2.22) X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD941C43E597735A9C351B198F4576AC7B2770D7874BA03B4AE182A05F538085040BECF0BFB3B01D7A7B9F9F84723F2B57E0AFC2E9071730E859DC93705460FCB91 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE77F5852B248C7AFEDEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063764BF1E09E94CC6278638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D84D9242E406E955095539C114F9FF19AD117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC3733B5EC72352B9FA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751FF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8B851EDB9C5A93305EEFF80C71ABB335746BA297DBC24807EABDAD6C7F3747799A X-C1DE0DAB: 0D63561A33F958A5E6BF0AFE4B3E976DFB012A596A84F4598B9FBBE5A4B11F17D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA751B940EDA0DFB0535410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34AF61ACC197BF517A2D7AB96B65DD8EE888E8FCF0E2DAC0A738984F8B8F63867DC71DB37D5BA727C81D7E09C32AA3244C462751037E451437C1092B08E6533EC0D9ADFF0C0BDB8D1FFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojMCfuYI4Prec4e7Oc9c/KeQ== X-Mailru-Sender: 3B9A0136629DC912F4AABCEFC589C81E109464FF988425C87CAF7A3646E5EEEBE6F631205E1350A8AD07DD1419AC565FA614486B47F28B67C5E079CCF3B0523AED31B7EB2E253A9E112434F685709FCF0DA7A0AF5A3A8387 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 Ostanevich via Tarantool-patches Reply-To: Sergey Ostanevich Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi! Thanks for the patch! Now direct_resize() will fail if it doesn't fit into the current place with a new size and a direct_alloc() supposedly will be called. This one doesn't help with 47-bit address AFAIU since it has no extra option - I doubt it exist at all - to ask kernel to fit. So, how it helps? Regards, Sergos > On 1 Aug 2021, at 13:36, 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/. > >> 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