Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp5752132rwb; Tue, 9 Aug 2022 03:36:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR7+s9fmUMZqLeufrS87q2SIHXCUUdE1+AxhvzAZ4zlEmXw4rWjdOtpkw+WnVZ7Wx3kIHxHq X-Received: by 2002:a17:907:3f87:b0:731:7702:50b9 with SMTP id hr7-20020a1709073f8700b00731770250b9mr4571514ejc.735.1660041369880; Tue, 09 Aug 2022 03:36:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660041369; cv=none; d=google.com; s=arc-20160816; b=VAtaWtQh45TFAGdIHLXIooy1FMp83k3D6dXbjBag1eHkBq4HKLnNucl7/0FCpjQTT2 JCY2q5NnRzgm1RsbNKB1urQJ3k4g7X1L5fM61rFq3Ju1ZN1ZJLldxJQGpAZfCHR9+dmu GY7gvulaJ9C87fluqptXjIWIiW9RL0bA/H//1izxvMihrVqA6Zd3NEPtZ1UVPrg4Ai0F TEbfPR+fV1Z8zXiziVDNhI8+c0B//0Q0JqB5RC3IJGUwbzsbHdv1dKmI7sItyNt/OVcK RcH5jLztBDWGOWG3EDv2ZqF27xN9w5GuLlh3pgxzXkhnZR1GLLxCSP2O9wZ//AYdL29v hxCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=Y3WuWSvZ7wJgo9yPVxROV6Sg+R19MrMXBZIad/qBeA8=; b=aTpllQNV18K8pryMTkEob/1Fktx/52z4pNkZOKqq29Hv/1RNvqRK0o71L1cIIcHpIX +Ltcdg5xC26TTuCmBNTt+hL8Nkr16Pgju6LYNvOr3dhh+pZ9Z8VaHbR/Xe//GKzc2wQj usTK7naA2BzwgmqC5aPIr4aPU4yKJ6cqWbaATEyp1X1jfkT8DlgzhuDormDsDX56CzJB zQvSQrkZX4E1EgIP3sJIunHYzFYFXDjP0cwXSptSTq0Cm1QXISAkHc1QEK2Dxqbz9YhE 4gelWVZncPt3o0tUj6/OIqE/I5AsE4tgOJcVzTj8rU5lGmkHrvZ9XT8MoTdMsgC630zW haDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b="kUmRLFd/"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z11-20020a1709063acb00b0072af95f96dbsi1495546ejd.70.2022.08.09.03.35.26; Tue, 09 Aug 2022 03:36:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b="kUmRLFd/"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229530AbiHIKUV (ORCPT + 99 others); Tue, 9 Aug 2022 06:20:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235729AbiHIKUV (ORCPT ); Tue, 9 Aug 2022 06:20:21 -0400 Received: from mail.sberdevices.ru (mail.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B6582BF9; Tue, 9 Aug 2022 03:20:19 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mail.sberdevices.ru (Postfix) with ESMTP id BEDE55FD05; Tue, 9 Aug 2022 13:20:17 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1660040417; bh=Y3WuWSvZ7wJgo9yPVxROV6Sg+R19MrMXBZIad/qBeA8=; h=From:To:Subject:Date:Message-ID:Content-Type:MIME-Version; b=kUmRLFd/bp4RKyjxGjO9HdaKN8AGjS4J5ZOq5mxKJb2rwUFKw/k0tJO1/Uc0M6hTy RA1ls3Wh/ApBjOBOZvxc601AqPDr11NIhqJ6RZ7k45TK3VsDdONeWCR8GK6pEnCOpg fEEf+2StUR39k+M1+DJrBhpXQCUcthlsAcW4MHk1uLV/HnlJLf6N2Se3yszwo6jetQ eQRe0HpzFRr623MTCZvzjRRIwMsGJ74ptDBHRFwLCKiT/WnTo2o1XcJ+HomhghbZIf zUhXyhBXy0dnsAMyK6F4KVWl7TnLq5YoWz68jQ/sHrNdYc5mHNwNnBy7hMkWg1ptl+ GnmgGZr+h3wKA== Received: from S-MS-EXCH02.sberdevices.ru (S-MS-EXCH02.sberdevices.ru [172.16.1.5]) by mail.sberdevices.ru (Postfix) with ESMTP; Tue, 9 Aug 2022 13:20:15 +0300 (MSK) From: Dmitry Rokosov To: Sergey Senozhatsky CC: Jiri Slaby , Linus Torvalds , Linux Kernel Mailing List , "minchan@kernel.org" , "ngupta@vflare.org" , Jan Kara , Ted Ts'o , Andreas Dilger , "Ext4 Developers List" , Aleksey Romanov Subject: Re: ext2/zram issue [was: Linux 5.19] Thread-Topic: ext2/zram issue [was: Linux 5.19] Thread-Index: AQHYq8XjXFXUH/5kskS0o+jO/1ewV62mBcyAgAAIiQCAAAf6gIAAAkUAgAAQzIA= Date: Tue, 9 Aug 2022 10:20:10 +0000 Message-ID: <20220809102011.pfhfb4k7tdkqvdai@CAB-WSD-L081021.sigma.sbrf.ru> References: <702b3187-14bf-b733-263b-20272f53105d@kernel.org> <8710b302-9415-458d-f8a2-b78cc3a96e49@kernel.org> In-Reply-To: Accept-Language: ru-RU, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.1.12] Content-Type: text/plain; charset="us-ascii" Content-ID: <7B174C30CC06914B82CCEDF3213811B1@sberdevices.ru> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2022/08/09 07:32:00 #20083496 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Hello Sergey, On Tue, Aug 09, 2022 at 06:20:04PM +0900, Sergey Senozhatsky wrote: > On (22/08/09 18:11), Sergey Senozhatsky wrote: > > > > > /me needs to confirm. > > > >=20 > > > > With that commit reverted, I see no more I/O errors, only oom-kille= r > > > > messages (which is OK IMO, provided I write 1G of urandom on a mach= ine w/ > > > > 800M of RAM): > > >=20 > > > Hmm... So handle allocation always succeeds in the slow path? (when w= e > > > try to allocate it second time) > >=20 > > Yeah I can see how handle re-allocation with direct reclaim can make it= more > > successful, but in exchange it oom-kills some user-space process, I sup= pose. > > Is oom-kill really a good alternative though? >=20 > We likely will need to revert e7be8d1dd983 given that it has some > user visible changes. But, honestly, failing zram write vs oom-kill > a user-space is a tough choice. I think oom-kill is an inevitable escape from low memory situation if we don't solve original problem with high memory consumption in the user setup. Reclaim-based zram slow path just delays oom if memory eating root cause is not resolved. I totally agree with you that all patches which have visible user degradations should be reverted, but maybe this is more user setup problem, what do you think? If you make the decision to revert slow path removal patch, I would prefer to review the original patch with unneeded code removal again if you don't mind: https://lore.kernel.org/linux-block/20220422115959.3313-1-avromanov@sberdev= ices.ru/ --=20 Thank you, Dmitry=