Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7867865rwb; Wed, 23 Nov 2022 11:53:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf4tc8TEntUtJ25xKym97Dv2q4s/irBsYSseRcGFr7xigIXXRb9KUGZ7r93+MJDSe7mJXyq2 X-Received: by 2002:a17:90a:f2cf:b0:20b:a5e:5c40 with SMTP id gt15-20020a17090af2cf00b0020b0a5e5c40mr32131079pjb.185.1669233180075; Wed, 23 Nov 2022 11:53:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669233180; cv=none; d=google.com; s=arc-20160816; b=JPDK4/BiNLTwqiN934oHA4nZgwJwuXNa42hccQYA/ktZEXR7X8AiS6sYlGFtxgkF1+ Yi+c62hFdgwryfa8nhO16E/HGzSmaSlkiVRqhSfMeihg3w1EZ20WvXH0dJuAltGcED3l KrIHNWW0JR0FcMwGYyTWpwXjImd6rMM3t052E1VHYMEiSExqc7DYVPWc5b2LjXwUWNAI Uwty+ftw0CBI5jeg0TLh2HSZ06wdv5ZLe1ILPFS9ynmSLPtDHTV3ZijUs39RnswSKWQp cnw4NrMKQLcqXgqP4TE5vmLqKoAofWzfPIOyMBEhCt2J8Y9zQZKvXm3H3B+sLjpXyEt7 C4Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=8zszPKirATociZwkufCMKuACjS2vwEYsrnSZpS9P9lU=; b=cjpo3xWHCysxwNwBkK4KLWS0Ih9UtZN5CyxnltzN4VMS4lAulXZayD1lDlixdcaefu aHEb6fRM8b9a9I0IDvepMNIRErReVp5LUkRNO3JdYQaiRNAFhFaJGNSprIUdMutaPWJO xOYunfcDXfN+ny5LrE73sXmmA+fRr9VWYKcBhoK0oxaH4LGwfW7JMQ9tVAxM7q6OyY7R pp3bv266hqPUNXnlHLsZkvcDSd6foEUWCAoNWRirOp45wb0fpbG1DdUWRWJq7qN3ICFC pDEF9uyOLzlAv6usiEIN+JwPRj8R38luTOP/QjIWUdcBmqR+4d9FsJkD1OsAX0ikYk7Y MtBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Pjl0mjJl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m5-20020a1709026bc500b00188a7bce175si4535629plt.34.2022.11.23.11.52.48; Wed, 23 Nov 2022 11:53:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=@gmail.com header.s=20210112 header.b=Pjl0mjJl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239862AbiKWTRc (ORCPT + 88 others); Wed, 23 Nov 2022 14:17:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239923AbiKWTRG (ORCPT ); Wed, 23 Nov 2022 14:17:06 -0500 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9CD8C72CA for ; Wed, 23 Nov 2022 11:17:05 -0800 (PST) Received: by mail-pl1-x62e.google.com with SMTP id p12so17506391plq.4 for ; Wed, 23 Nov 2022 11:17:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=8zszPKirATociZwkufCMKuACjS2vwEYsrnSZpS9P9lU=; b=Pjl0mjJlKG1hOe2sKOhjXT4gUoSAjgo1SasKPbLKNH10Mwo7iw07plvWf50TYRiYD/ lmRm617Y3gCQ+CaSwGIqJnTR/lpteyBRLmBW+LlbxUuLHhx9sld4qVIx721DTVCXv/Xr 1mr8W6jJh3AqJ0uXmDXyWm/vfk14FQM7Wp5D0znqXME4eVBcJ3uM58CzPXFkmyH/MWLl yYMsvLyoBqUut6u3gJo1d6E6Pm/MKgJDYyP0vFzlusNnIj7iuPmMqURMzx9knZcUPOJO QQnzOGwFW2ItNQfq1Yp/dTsbGx9WEXSoN2+LmOaiC+rFYLB8QwH/JMaq6dctbb7sWXCJ b7TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8zszPKirATociZwkufCMKuACjS2vwEYsrnSZpS9P9lU=; b=qH+CY+8vTKO0VU1p4KCwTgqLrK7twSIU1TgbMQ25NMau9DGBGRa5Uwuk2i/noz1g+7 i1dvdXzV+zBqfeh/eKO9AhuxJ2pLFJheAoGTznfPJQxgoepvkDwW+uO8jfat74I/3iqU VtVy3HenXp/DAQZKLKV5P8i2fRbfWZdtzFvXIDpqCIiC8eKLX42vdktydX7GHg+3Nr6x yS7Q6fR9cKnyQuDOs96vz9dZOETCv18LQJYFKlz+sOxd0yNMPIO9pFCw8rMpOlCcAetk Fx4ACHcDfNoprCJlUdXi+IsDAqPi56+PFS9x9fglGaJOeBBztP0FBtyPykkPKY3CVHPU Oigg== X-Gm-Message-State: ANoB5pl9t3+jXlJOge7WHB1PR2xaxOyc0K7xQ1l9AUYxCB+KmccAx7ms i/1z0auxndQ2HW/bSRVwQM8= X-Received: by 2002:a17:902:9881:b0:188:62b8:2278 with SMTP id s1-20020a170902988100b0018862b82278mr16094017plp.96.1669231025106; Wed, 23 Nov 2022 11:17:05 -0800 (PST) Received: from localhost (fwdproxy-prn-014.fbsv.net. [2a03:2880:ff:e::face:b00c]) by smtp.gmail.com with ESMTPSA id i29-20020a63131d000000b00460ea630c1bsm11021421pgl.46.2022.11.23.11.17.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Nov 2022 11:17:04 -0800 (PST) From: Nhat Pham To: akpm@linux-foundation.org Cc: hannes@cmpxchg.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, minchan@kernel.org, ngupta@vflare.org, senozhatsky@chromium.org, sjenning@redhat.com, ddstreet@ieee.org, vitaly.wool@konsulko.com Subject: [PATCH v6 0/6] Implement writeback for zsmalloc (fix) Date: Wed, 23 Nov 2022 11:17:01 -0800 Message-Id: <20221123191703.2902079-1-nphamcs@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 This contains two small fixes that should be applied on top of patch 4 and patch 6 of my zsmalloc writeback series, respectively. Changelog: v6-fix: * Add a comment explaining LRU update logic in zs_map_object. (patch 4) (sugegested by Sergey Senozhatsky and Johannes Weiner). * Use get_first_page() and add cond_resched() in retry-loop. (patch 6) (sugegested by Sergey Senozhatsky). v6: * Move the move-to-front logic into zs_map_object (patch 4) (suggested by Minchan Kim). * Small clean up for free_zspage at free_handles() call site (patch 6) (suggested by Minchan Kim). v5: * Add a new patch that eliminates unused code in zpool and simplify the logic for storing evict handler in zbud/z3fold (patch 2) * Remove redudant fields in zs_pool (previously required by zpool) (patch 3) * Wrap under_reclaim and deferred handle freeing logic in CONFIG_ZPOOL (patch 6) (suggested by Minchan Kim) * Move a small piece of refactoring from patch 6 to patch 4. v4: * Wrap the new LRU logic in CONFIG_ZPOOL (patch 3). (suggested by Minchan Kim) v3: * Set pool->ops = NULL when pool->zpool_ops is null (patch 4). * Stop holding pool's lock when calling lock_zspage() (patch 5). (suggested by Sergey Senozhatsky) * Stop holding pool's lock when checking pool->ops and retries. (patch 5) (suggested by Sergey Senozhatsky) * Fix formatting issues (.shrink, extra spaces in casting removed). (patch 5) (suggested by Sergey Senozhatsky) v2: * Add missing CONFIG_ZPOOL ifdefs (patch 5) (detected by kernel test robot). -- 2.30.2