Message ID | 20250129064853.2210753-7-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 58CF4C02192 for <linux-mm@archiver.kernel.org>; Wed, 29 Jan 2025 06:49:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E40AE280028; Wed, 29 Jan 2025 01:49:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DF0CE28001A; Wed, 29 Jan 2025 01:49:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C91BD280028; Wed, 29 Jan 2025 01:49:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id A929228001A for <linux-mm@kvack.org>; Wed, 29 Jan 2025 01:49:40 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 5ED621209C0 for <linux-mm@kvack.org>; Wed, 29 Jan 2025 06:49:40 +0000 (UTC) X-FDA: 83059563720.21.CE99D63 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by imf19.hostedemail.com (Postfix) with ESMTP id 787211A0010 for <linux-mm@kvack.org>; Wed, 29 Jan 2025 06:49:38 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=j7XCIncJ; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf19.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.214.171 as permitted sender) smtp.mailfrom=senozhatsky@chromium.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1738133378; a=rsa-sha256; cv=none; b=JcDuul05AwH3aLTNpd/caUCdhRu/HZdMd8vNOjqe9xv6wSh+kqAegbDolNXkXnpU1TSngM AV0NFASu5QQHTF+ZLdrNGN+E4JEh4w/3eMvS88T0TzMgyoJXluJ68XRmt2WFwM7WwD/mny p0+ajQpKJETE2ov85aGN6nQ3Um8B7e8= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=j7XCIncJ; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf19.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.214.171 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=1738133378; 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=gfp8uwAqX2fQQ557CvMamUHS46A4+CZJX9ECOuA80/GQWislkqGAjX12XkJehN02X+VJBY RkCqE/5Xgzp+gv2DInLQb9BlwcJyfuwfgtgVF9xAw0F/cbV7AwOx3S9IK1XHsEyQ9RO7a7 H2g4mT+IYyEL3i9+iMxqtuiyjinbyX0= Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-21680814d42so106158325ad.2 for <linux-mm@kvack.org>; Tue, 28 Jan 2025 22:49:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1738133377; x=1738738177; 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=j7XCIncJlW3rrMNiV6wXcOpLK437jreZ7lvuVIq1sp4aWyoi8jIRvj4W/nVF6vPek6 4/y8IRuaUeSLEl3drL112q1xUawk32l5jUTi7M8yTfvwzj5Xuzvyesna1MpX1WcQAdwO nL63BbcWzGgKtoob+gA7jrU6hSjXa8btxwZr4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738133377; x=1738738177; 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=CeCigBEkV1nO96JjsX+YcDfoPfVLtdnOnHM4ZhA5ZGejruKzKJovobxbEoUVuv2kXP p1OBFQg4h7UhU5aXGTKVD6TWpDJOME3xN1yBbKGQ5FF2Y9GrV/wahWR/iF81pufYgyot gXCOBrP9C+TUSXNZqqN3ORCfG/UAMA1hGmsWTfcRbcFpXDuQXi8eDPJIuED+ycZJxG/i RFrwNNwKKCx59RPcNhCIMXurvVi68tbzbr+5oPdgPXHKs8BjLTRIRgcC/HOwewAKSa5x 6N9MkJZvf5aMGh0IchTQly0zKiLYRiuF3cwXSIWlwFWekJcZ29YpKoj/VZLSlFWpzIVS 3hVA== X-Gm-Message-State: AOJu0YyVe9ejgm51CY5Hf19BC6ryTN6nkwYIhKoC3nC3q53jgXyyxk4K cS2msVbfOv+oqLO5deXk1Lx01BNoUwS7pqlzaXrrlw2QMiQygeCs1YBu82K62g== X-Gm-Gg: ASbGncuAVM6pMiJxzfmErGj2LFeEDDdIC4bpaRZFEIFq337Ad+AKMeS7PwHUPhCU3XI a0BIsRRAAKYn0AMK626M+af0u98i9/geLxODKuWYW211LDcR9ZK2o/3+kP23jbykIhpgyTwayQi 9FWjmwN6morMjTRNjUGh5NVU1Hgty0GdfZCMpP6vBNonUV33SK0pM8Qnhggmspni3I8XwrmA2Sk jEJOhFLkM0hwnA5kZKUwOVdFRqltujqo04e/U6o6xQbwmom5oHEeBCcu2tSXVwXNL36FOMVkeIh kTWYi6cq3j2A4MV22w== X-Google-Smtp-Source: AGHT+IHpYdhdLXmXOk5qBuPck2oehFerwvlvK33kiZAY6yd9iS5YnP5pPEjTkuad2sOYZEHR81MPJw== X-Received: by 2002:a05:6300:668b:b0:1e1:a0b6:9861 with SMTP id adf61e73a8af0-1ed7a5f6fc0mr3451155637.12.1738133377322; Tue, 28 Jan 2025 22:49:37 -0800 (PST) Received: from localhost ([2401:fa00:8f:203:b323:d70b:a1b8:1683]) by smtp.gmail.com with UTF8SMTPSA id 41be03b00d2f7-ac495d58478sm9397597a12.54.2025.01.28.22.49.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Jan 2025 22:49:37 -0800 (PST) From: Sergey Senozhatsky <senozhatsky@chromium.org> To: Andrew Morton <akpm@linux-foundation.org>, Minchan Kim <minchan@kernel.org>, Johannes Weiner <hannes@cmpxchg.org>, Yosry Ahmed <yosry.ahmed@linux.dev>, Nhat Pham <nphamcs@gmail.com> Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky <senozhatsky@chromium.org> Subject: [PATCHv1 6/6] zram: add might_sleep to zcomp API Date: Wed, 29 Jan 2025 15:43:52 +0900 Message-ID: <20250129064853.2210753-7-senozhatsky@chromium.org> X-Mailer: git-send-email 2.48.1.262.g85cc9f2d1e-goog In-Reply-To: <20250129064853.2210753-1-senozhatsky@chromium.org> References: <20250129064853.2210753-1-senozhatsky@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 787211A0010 X-Stat-Signature: 6nuypba8nwqqxiizo99943aq1werhc65 X-Rspam-User: X-HE-Tag: 1738133378-297331 X-HE-Meta: U2FsdGVkX1+GCFM2ewAwZiwG2Ej5XcO+hvjyQTe2yHOsBmPugYUQ/O7K9/VPEXwh7Xha9K7hY1G1mzVgv4nF/ssWSH+6gk9X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t8y1QiTjdQ4FUm5MaGuKkdbVAnZX9NAT8Qwu40EfcBClJnL8nicKPK4NAIJjJ1hsa/3MJ+MO2y5rId5rGkoe3R0VjY7yBkc9HZxrvxQl2G+Gi3Ul25ax+gNRENQcvOVNAivPnRVP4Oy6yt2ShhtZnV1xDtI2uj1amPyLdEPEDxSipP1E= 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(+)