Message ID | 20200801154632.866356-1-laoar.shao@gmail.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <SRS0=TPi/=BL=kvack.org=owner-linux-mm@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 222E614B7 for <patchwork-linux-mm@patchwork.kernel.org>; Sat, 1 Aug 2020 15:47:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E389B2071E for <patchwork-linux-mm@patchwork.kernel.org>; Sat, 1 Aug 2020 15:47:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ISt6b5CO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E389B2071E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DA9EA8D0090; Sat, 1 Aug 2020 11:47:06 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D5CCE8D0081; Sat, 1 Aug 2020 11:47:06 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C70A38D0090; Sat, 1 Aug 2020 11:47:06 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0107.hostedemail.com [216.40.44.107]) by kanga.kvack.org (Postfix) with ESMTP id B1FF48D0081 for <linux-mm@kvack.org>; Sat, 1 Aug 2020 11:47:06 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 7563F180AD806 for <linux-mm@kvack.org>; Sat, 1 Aug 2020 15:47:06 +0000 (UTC) X-FDA: 77102428452.25.smash38_300804b26f8d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin25.hostedemail.com (Postfix) with ESMTP id 49CE81804E3A8 for <linux-mm@kvack.org>; Sat, 1 Aug 2020 15:47:06 +0000 (UTC) X-Spam-Summary: 1,0,0,56a15797f0b4e652,d41d8cd98f00b204,laoar.shao@gmail.com,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1345:1437:1534:1541:1711:1730:1747:1777:1792:2393:2559:2562:2897:3138:3139:3140:3141:3142:3352:3865:3867:3868:3870:3871:4384:4605:5007:6120:6261:6653:7576:7875:7901:7903:9413:10004:11026:11473:11658:11914:12048:12296:12297:12517:12519:12679:12895:13069:13161:13229:13311:13357:14096:14181:14384:14394:14687:14721:21080:21433:21444:21451:21627:21666:30054:30064:30069:30070,0,RBL:209.85.214.193:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.50.0.100;04yfa3fs3igaswrd5j6pzwfadqf1xocze9ufr8z3k4kzqex7uuffuq5w19bhgqf.yxdzpiisp1jthqya898xy1bmwa9669gabsxjk7j6bxeocp6m8zm8ntmfqmjbsu7.n-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: smash38_300804b26f8d X-Filterd-Recvd-Size: 3929 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by imf41.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Sat, 1 Aug 2020 15:47:05 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id g19so6148695plq.0 for <linux-mm@kvack.org>; Sat, 01 Aug 2020 08:47:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=1/LIK5z8LpEjaiV5PgdQN/TGYlLzQCzLQ9WZxCYRT3M=; b=ISt6b5CO+PgBxTFtNQZKUWC+4k97ipOTgJP3Xr/eVnzsbq4L6hMsMXl1Atk76btI+B +IdfvHkDp3mPAE/l3Z7o+F42/kAeIDELcyohqWtbNROo53RP+LJjHV9gbtM0voE+9fRp 1UYLlVhNa6i8j/BPMtiaK+7dpe1lMfRk+z2JFbFseCQakIGEEaojWlnSo0DQhDo9TfPk xrCf3szjilwKlr0osaUlR0hyNlj43xJtpniMp2SSBP/2IHRd1hWJugfkWTxHoJXDT8tC D+aKPfvpr479steWWD4v5mdds/D06f4g0XeJ2K1a8q7L0towXtGDs6cdyz/KxkKBbkap Ck0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=1/LIK5z8LpEjaiV5PgdQN/TGYlLzQCzLQ9WZxCYRT3M=; b=cskavWKyothQByDkUV84ZXT9oHFSuBdULmkSHfi6YlcC3KFj1ZuY1VWKDD0HYtrAzr BgSlhFA3XxjaCEKC1bhnpZoJUDIhVgPGRTWS2K4THHXIhGanMOevDZc1y9AebIvYJweF 8VzIcnkJnbGHNGTe9PtDY7M0YsfJFFCVJEAzx2VOH1uXxhCwmduTOCCcmvERYQzkTf2V BrCZK1pX3IPzcPCsoI++wgNv+9Ht6mKuG6nMta7/8W8NQ9H22A8qKgns00+LfrJvVrjJ vqxnnZNzSsVWKcku9Wa5lA3YNvnguJGGpA/1fg9GbY5qzrX9M1wYnht9hW9xlgY1t8a5 l2ow== X-Gm-Message-State: AOAM532ka56Ulyv+wcL4ONstUpSk3GBJs2QLjrfTK0LFcy+xF/CcUqel 9oTaOo7k7emeDz+qu3FhY40= X-Google-Smtp-Source: ABdhPJzqUrDCi4cOXpwbQuNP60rIW0VC6lAm2NgSe1BZqzk6DL+PHJTL+GDRC+TI2aJCSxqBKHSK4A== X-Received: by 2002:a17:90b:20d1:: with SMTP id ju17mr6082268pjb.219.1596296824919; Sat, 01 Aug 2020 08:47:04 -0700 (PDT) Received: from localhost.localdomain ([203.100.54.194]) by smtp.gmail.com with ESMTPSA id j26sm13717331pfe.200.2020.08.01.08.47.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Aug 2020 08:47:04 -0700 (PDT) From: Yafang Shao <laoar.shao@gmail.com> To: david@fromorbit.com, hch@infradead.org, darrick.wong@oracle.com, mhocko@kernel.org, willy@infradead.org Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Yafang Shao <shaoyafang@didiglobal.com> Subject: [PATCH v4 0/2] void xfs transaction reservation recursion Date: Sat, 1 Aug 2020 11:46:30 -0400 Message-Id: <20200801154632.866356-1-laoar.shao@gmail.com> X-Mailer: git-send-email 2.18.1 X-Rspamd-Queue-Id: 49CE81804E3A8 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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> |
Series |
void xfs transaction reservation recursion
|
expand
|
From: Yafang Shao <shaoyafang@didiglobal.com> This patchset avoids transaction reservation recursion by reintroducing the discarded PF_FSTRANS in a new way, suggested by Dave. In this new implementation, two new helpers are introduced, which are xfs_trans_context_{begin, end}, suggested by Christoph. And re-using the task->journal_info to indicates whehter the task is in fstrans or not, suggested by Willy. v4: - retitle from "xfs: introduce task->in_fstrans for transaction reservation recursion protection" - reuse current->journal_info, per Willy Yafang Shao (2): xfs: avoid double restore PF_MEMALLOC_NOFS if transaction reservation fails xfs: avoid transaction reservation recursion Cc: Dave Chinner <david@fromorbit.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Michal Hocko <mhocko@kernel.org> Cc: Darrick J. Wong <darrick.wong@oracle.com> Cc: Matthew Wilcox <willy@infradead.org> fs/iomap/buffered-io.c | 4 ++-- fs/xfs/libxfs/xfs_btree.c | 2 ++ fs/xfs/xfs_aops.c | 3 +++ fs/xfs/xfs_linux.h | 19 +++++++++++++++++++ fs/xfs/xfs_trans.c | 21 +++++++++++++++------ 5 files changed, 41 insertions(+), 8 deletions(-)