Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2390207rdf; Mon, 6 Nov 2023 12:42:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IE1mXU+nuBC/iMpGkHe24rQGIdCC6FqWDp6DsbJPNfk5qv/MpC98YU1bcTEDNwsT96wI/Ic X-Received: by 2002:a05:6358:881f:b0:168:ed99:4e74 with SMTP id hv31-20020a056358881f00b00168ed994e74mr44849693rwb.20.1699303374026; Mon, 06 Nov 2023 12:42:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699303373; cv=none; d=google.com; s=arc-20160816; b=xiyQyyV7hcsGwv3pA2JEeM4pBY7gpnWkVu5iGMMySXb5sDgS+4HDvN+aGdNjxNzM1P PN6XNLpJykWs1SCTsUCoKWP2ZIOrAAi/o3Xx9a0ErGj7AY3fIgMfbBxDovbV5yHwoyeb l7Sdb6TsHaiBfV1thGRgMX5UCCOIB08Xz1Mpc3XMSoJlGKJb1pABQuxENeTbpGZpcfr8 +2cXHdoN716HxW09Xus9H4Ma1QhaGACtjYb9VpeG9e64topJgQYxfvZZbj3wOtqN/bcF EsGfKZcw7WLTHnRMljyApTlVWQ1WIhScxD/a7nzv4KFc3u0rr00+UiTt433xdIOLGx2c 5gnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language:cc:to :subject:from:mime-version:date:dkim-signature:message-id; bh=lxSSHLlpMAVuMGFjx50YyUPGJuUALuzSwXJlLTkwHUg=; fh=gaBdF2fxwNxCuTCqRe00/rCXWp2DwFdMZRDQPiFBRds=; b=EQQPKTQGXkeL/c+o1tZJ8vcJZSK4NqkhT/8reNO2pBB7pzVrpu6JJDkbARS54/Sj39 MsvjMPS5It9KgAR1dZ+Bo2WZqKRjBHLvAvpyNWhi/1tm3CzUBgDpyL9u+obdD1BRgE3l sUCZFZgeqQiIbqZtJhF0oSwJtb+bICVRrvtKrrR4oJvCYAyBM8rfIzKRbX/6xE5XuSR6 Ptp8zlNRPBSunmJxulpbbnBQIDTXhLmFmqtArhSaRG+WTbRJl1wFhtApEJtVbfTcBwbb aSpqb0/7pfpLyk6Kb4ayfg1LnOxjFN552oUrIDyKdpnYRvSRVcRUFzB2fQeBDVwpi4bj hcEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Vre5kFlK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id j4-20020a63b604000000b00565f0e9cfbbsi429783pgf.382.2023.11.06.12.42.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 12:42:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Vre5kFlK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id CD4B1806CF7F; Mon, 6 Nov 2023 12:42:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233040AbjKFUmm (ORCPT + 99 others); Mon, 6 Nov 2023 15:42:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232972AbjKFUmk (ORCPT ); Mon, 6 Nov 2023 15:42:40 -0500 X-Greylist: delayed 2882 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 06 Nov 2023 12:42:36 PST Received: from out-180.mta1.migadu.com (out-180.mta1.migadu.com [95.215.58.180]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1E2AD51 for ; Mon, 6 Nov 2023 12:42:36 -0800 (PST) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1699303355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lxSSHLlpMAVuMGFjx50YyUPGJuUALuzSwXJlLTkwHUg=; b=Vre5kFlKRNVZua2gus2elLHhkFMxkqdUYeTN0eTf58d6alUSSBwj5NLFgY4YBwEKSypbV+ FGVxbUHUKgVXFUzNI1UCRG28T3uvVFFdo1nZvcC+rINZ5K53K0/Lucnup0yUMLMSRUHsit JNaan89ZXHgIyzxRymDmyEyfJXeAIMs= Date: Mon, 6 Nov 2023 23:42:31 +0300 MIME-Version: 1.0 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vasily Averin Subject: zram: zram_free_page calls in zram_meta_free To: Sergey Senozhatsky , Minchan Kim Cc: "linux-kernel@vger.kernel.org" , linux-block@vger.kernel.org Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, 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-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 06 Nov 2023 12:42:52 -0800 (PST) The only place where content of zram entry is accessed and even changed without taken zran lock is zram_free_page() calls from zram_meta_free(). It does not look like problem because zram should not have any users at this point, however I still do not understand why this is required? Is it performance optimization? But zram reset is quite rare operation, I doubt it is called on some performance-critical fast path. Am I missed something perhaps? I would like to add proper zram_lock/unlock calls around zram_free_page here, and would like to clarify,perhaps you have any objections? Thank you, Vasily Averin