Message ID | 20250130044455.2642465-8-senozhatsky@chromium.org (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10640C0218F for <linux-mm@archiver.kernel.org>; Thu, 30 Jan 2025 04:45:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9AAA62800B9; Wed, 29 Jan 2025 23:45:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 959F328004D; Wed, 29 Jan 2025 23:45:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 823382800B9; Wed, 29 Jan 2025 23:45:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id D85CD28004D for <linux-mm@kvack.org>; Wed, 29 Jan 2025 23:45:45 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 8A417160870 for <linux-mm@kvack.org>; Thu, 30 Jan 2025 04:45:45 +0000 (UTC) X-FDA: 83062880250.08.4103548 Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by imf11.hostedemail.com (Postfix) with ESMTP id A897440009 for <linux-mm@kvack.org>; Thu, 30 Jan 2025 04:45:43 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=AjawapCv; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf11.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.216.44 as permitted sender) smtp.mailfrom=senozhatsky@chromium.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1738212343; a=rsa-sha256; cv=none; b=I9sCOLx3BZGj7cM0t6Rr1f2zpZW6+zPlJIdpcRCr5rOJT6bOprO8/IxygDntJqJnKb38hI ftYgP3sCYuCJEj3wLLsUSvtpV5eQ6nXg3Z3NGHp15AtRvQ4SZcaC/bYJK3W0Ev5kH933Np gGwIRLdEagpz5qchQ2/XsXFUCnTc4SM= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=AjawapCv; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf11.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.216.44 as permitted sender) smtp.mailfrom=senozhatsky@chromium.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1738212343; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=LjUByDm3ba8JrZJ2xgEVKiM3B6T3dmGtNNYJyOcrU3Y=; b=lfragN37FhpxsFTssgE90bLsCV9130Bue1dZqhygAHjH6JUOr9yKq5QB99NHKAsLvge+ev Od5L+iutb1+oh65cPhllsqonohkkvbyxF50tZvQIbFPvfgO4MWW6JZL9gkY+yflms3rUA5 4UD1waHzuh9QVE3b/Atcs+1cVSUX3dc= Received: by mail-pj1-f44.google.com with SMTP id 98e67ed59e1d1-2ef72924e53so562031a91.3 for <linux-mm@kvack.org>; Wed, 29 Jan 2025 20:45:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1738212342; x=1738817142; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LjUByDm3ba8JrZJ2xgEVKiM3B6T3dmGtNNYJyOcrU3Y=; b=AjawapCv6yHEtxhSZxATy0fhG4MwOxNQN+ai/wYN3aEyP/eriBQR2oqcSSVGSN/QQe 5QktMabqSvkCnJAI4gkcEbaSRQ8yEp57cRl25wp2OJZorc06jF9PmAJ233AdDOiVUc4V T/2vyW4IcVIBmH1s4F819qP/vOUnxJWsK7HDM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738212342; x=1738817142; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LjUByDm3ba8JrZJ2xgEVKiM3B6T3dmGtNNYJyOcrU3Y=; b=Euz3vvkcOH4j9VIjfrt+MuNvRHdF67+6mbCqLnhptDXl7TihDUN1GvyHHLMJFcamIV 719z80sfYz21iSJx+fYds/J6Bsw4yOz/EB5DBrx4VKRGw71J3ANVA8gnBXX5iYHPptbj Mb3JUImP2i9KUq7EVN0aYbPDqNuYHeA5hcRwG94cvcOTEw4GWhvn2ozBnsMYSU/r0NvH BHsIMJy2af7GIws+SAB3vI5y/xny2DeojjjO5lCXiNQYhQdI7ZbkN6KerWsBcVUygdWR 09f5GrmM6PXVOEuI3Q2FnWlSuruYPk91i4vrahjFFgG+tBg9M+Za46o81VwLNy1ZzEA9 DPrg== X-Forwarded-Encrypted: i=1; AJvYcCVhJlwufiGTdziYsH1A5dWRl/E8LywAL7O5RAC3f1456jH1KBFhISxoTL0QyoU90EAXyIo6XH74oA==@kvack.org X-Gm-Message-State: AOJu0Ywu/SsNEV8tgccBglEI9Aonunkfln3u3J35W3KuM6AxJ5AsYZSE CslzOHaXnnsM7lfdtFfoeyN0nP7sspiSV8XwoJ7RWV/F2gEGNzxOi9dHmhBiEA== X-Gm-Gg: ASbGncsijFax9wFxt7Ym3dUwptHzDs+aBQvAbLaifn2WlrWS8j0pxp4S3g+83QC9mlP JqjSFkCyzRkzNbh6L2is8Oqy2hk2LiM3ApGZoVGsv2K4VHA60Cz1tzwyTKkASOm690MYIHUXMuw gadSWII7H9kh2e54Vmx2ZpyyqI1a1xPkXpED730fYrT7VqICJBn01W5bCufzwUogbEpbJthZ8++ 27PNLfmlL6Tpmt7/lM2A+StmqgdvlqqVoYy9I474L/DCv1KrVG3on/6nxp3lmXzMTwURXWxMXQ6 T0btWdEOiQA7FNkCxQ== X-Google-Smtp-Source: AGHT+IGkGP9NGStcdcyDxCKvmSx/umN39Bj6YAsUZh4NBQvKyyiQWE/6vXXCCD2x2gkOQQ39AR/qSQ== X-Received: by 2002:a17:90b:288a:b0:2ee:d35c:3996 with SMTP id 98e67ed59e1d1-2f83ac8371amr8132916a91.31.1738212342552; Wed, 29 Jan 2025 20:45:42 -0800 (PST) Received: from localhost ([2401:fa00:8f:203:d794:9e7a:5186:857e]) by smtp.gmail.com with UTF8SMTPSA id 98e67ed59e1d1-2f83a194a0csm2205072a91.1.2025.01.29.20.45.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Jan 2025 20:45:42 -0800 (PST) From: Sergey Senozhatsky <senozhatsky@chromium.org> To: Andrew Morton <akpm@linux-foundation.org>, Yosry Ahmed <yosry.ahmed@linux.dev> Cc: Minchan Kim <minchan@kernel.org>, Johannes Weiner <hannes@cmpxchg.org>, Nhat Pham <nphamcs@gmail.com>, Uros Bizjak <ubizjak@gmail.com>, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky <senozhatsky@chromium.org> Subject: [PATCHv2 7/7] zram: add might_sleep to zcomp API Date: Thu, 30 Jan 2025 13:42:50 +0900 Message-ID: <20250130044455.2642465-8-senozhatsky@chromium.org> X-Mailer: git-send-email 2.48.1.262.g85cc9f2d1e-goog In-Reply-To: <20250130044455.2642465-1-senozhatsky@chromium.org> References: <20250130044455.2642465-1-senozhatsky@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Queue-Id: A897440009 X-Rspamd-Server: rspam10 X-Stat-Signature: 4padekadjxyj3aw198u1ct4eksw43oh4 X-H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SxD0gcFFebzCSsVWYiYSR9JwC32XQjyQDAM2DFv9+ilv2kAPxbrMK/82Agu7/SCX8tP9zca43HirvL2Riv+IGcFmpqWBSC3yXAppuNigkbwcWmfAWcV7niO9qqaqNcgyLR3rf4AgmJapSPno1BDtjTD/SQilmSRgTA3wWjFK8CJ5N8lElB7EgstuvxVL3QFgjm0X6i6ULsDztVbvv+G11sIwkX7YTg9sXdnuaMh+1hEx19ZM2+6g5m0sb0mw09ujPGbY4dF/aNVPGk3p90W/Uf/v/s3glp1/thE= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
zsmalloc: preemptible object mapping
|
expand
|
diff --git a/drivers/block/zram/zcomp.c b/drivers/block/zram/zcomp.c index 675f2a51ad5f..f4235735787b 100644 --- a/drivers/block/zram/zcomp.c +++ b/drivers/block/zram/zcomp.c @@ -185,6 +185,7 @@ int zcomp_compress(struct zcomp *comp, struct zcomp_strm *zstrm, }; int ret; + might_sleep(); ret = comp->ops->compress(comp->params, &zstrm->ctx, &req); if (!ret) *dst_len = req.dst_len; @@ -201,6 +202,7 @@ int zcomp_decompress(struct zcomp *comp, struct zcomp_strm *zstrm, .dst_len = PAGE_SIZE, }; + might_sleep(); return comp->ops->decompress(comp->params, &zstrm->ctx, &req); }
Explicitly state that zcomp compress/decompress must be called from non-atomic context. Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org> --- drivers/block/zram/zcomp.c | 2 ++ 1 file changed, 2 insertions(+)