From: kernel test robot <lkp@intel.com>
To: Dave Chinner <david@fromorbit.com>, linux-xfs@vger.kernel.org
Cc: kbuild-all@lists.01.org
Subject: Re: [PATCH 1/9] xfs: move and xfs_trans_committed_bulk
Date: Wed, 10 Aug 2022 22:17:53 +0800 [thread overview]
Message-ID: <202208102203.TPVkxa2S-lkp@intel.com> (raw)
In-Reply-To: <20220809230353.3353059-2-david@fromorbit.com>
Hi Dave,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on xfs-linux/for-next]
[also build test WARNING on linus/master next-20220810]
[cannot apply to v5.19]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Dave-Chinner/xfs-byte-base-grant-head-reservation-tracking/20220810-072405
base: https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git for-next
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220810/202208102203.TPVkxa2S-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/f02000d53b0e6d6ac32e63c1ac72be9aa7c1b69c
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Dave-Chinner/xfs-byte-base-grant-head-reservation-tracking/20220810-072405
git checkout f02000d53b0e6d6ac32e63c1ac72be9aa7c1b69c
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash fs/xfs/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> fs/xfs/xfs_log_cil.c:729:1: warning: no previous prototype for 'xlog_cil_ail_insert' [-Wmissing-prototypes]
729 | xlog_cil_ail_insert(
| ^~~~~~~~~~~~~~~~~~~
vim +/xlog_cil_ail_insert +729 fs/xfs/xfs_log_cil.c
707
708 /*
709 * Take the checkpoint's log vector chain of items and insert the attached log
710 * items into the the AIL. This uses bulk insertion techniques to minimise AIL
711 * lock traffic.
712 *
713 * If we are called with the aborted flag set, it is because a log write during
714 * a CIL checkpoint commit has failed. In this case, all the items in the
715 * checkpoint have already gone through iop_committed and iop_committing, which
716 * means that checkpoint commit abort handling is treated exactly the same as an
717 * iclog write error even though we haven't started any IO yet. Hence in this
718 * case all we need to do is iop_committed processing, followed by an
719 * iop_unpin(aborted) call.
720 *
721 * The AIL cursor is used to optimise the insert process. If commit_lsn is not
722 * at the end of the AIL, the insert cursor avoids the need to walk the AIL to
723 * find the insertion point on every xfs_log_item_batch_insert() call. This
724 * saves a lot of needless list walking and is a net win, even though it
725 * slightly increases that amount of AIL lock traffic to set it up and tear it
726 * down.
727 */
728 void
> 729 xlog_cil_ail_insert(
730 struct xlog *log,
731 struct list_head *lv_chain,
732 xfs_lsn_t commit_lsn,
733 bool aborted)
734 {
735 #define LOG_ITEM_BATCH_SIZE 32
736 struct xfs_ail *ailp = log->l_ailp;
737 struct xfs_log_item *log_items[LOG_ITEM_BATCH_SIZE];
738 struct xfs_log_vec *lv;
739 struct xfs_ail_cursor cur;
740 int i = 0;
741
742 spin_lock(&ailp->ail_lock);
743 xfs_trans_ail_cursor_last(ailp, &cur, commit_lsn);
744 spin_unlock(&ailp->ail_lock);
745
746 /* unpin all the log items */
747 list_for_each_entry(lv, lv_chain, lv_list) {
748 struct xfs_log_item *lip = lv->lv_item;
749 xfs_lsn_t item_lsn;
750
751 if (aborted)
752 set_bit(XFS_LI_ABORTED, &lip->li_flags);
753
754 if (lip->li_ops->flags & XFS_ITEM_RELEASE_WHEN_COMMITTED) {
755 lip->li_ops->iop_release(lip);
756 continue;
757 }
758
759 if (lip->li_ops->iop_committed)
760 item_lsn = lip->li_ops->iop_committed(lip, commit_lsn);
761 else
762 item_lsn = commit_lsn;
763
764 /* item_lsn of -1 means the item needs no further processing */
765 if (XFS_LSN_CMP(item_lsn, (xfs_lsn_t)-1) == 0)
766 continue;
767
768 /*
769 * if we are aborting the operation, no point in inserting the
770 * object into the AIL as we are in a shutdown situation.
771 */
772 if (aborted) {
773 ASSERT(xlog_is_shutdown(ailp->ail_log));
774 if (lip->li_ops->iop_unpin)
775 lip->li_ops->iop_unpin(lip, 1);
776 continue;
777 }
778
779 if (item_lsn != commit_lsn) {
780
781 /*
782 * Not a bulk update option due to unusual item_lsn.
783 * Push into AIL immediately, rechecking the lsn once
784 * we have the ail lock. Then unpin the item. This does
785 * not affect the AIL cursor the bulk insert path is
786 * using.
787 */
788 spin_lock(&ailp->ail_lock);
789 if (XFS_LSN_CMP(item_lsn, lip->li_lsn) > 0)
790 xfs_trans_ail_update(ailp, lip, item_lsn);
791 else
792 spin_unlock(&ailp->ail_lock);
793 if (lip->li_ops->iop_unpin)
794 lip->li_ops->iop_unpin(lip, 0);
795 continue;
796 }
797
798 /* Item is a candidate for bulk AIL insert. */
799 log_items[i++] = lv->lv_item;
800 if (i >= LOG_ITEM_BATCH_SIZE) {
801 xlog_cil_ail_insert_batch(ailp, &cur, log_items,
802 LOG_ITEM_BATCH_SIZE, commit_lsn);
803 i = 0;
804 }
805 }
806
807 /* make sure we insert the remainder! */
808 if (i)
809 xlog_cil_ail_insert_batch(ailp, &cur, log_items, i, commit_lsn);
810
811 spin_lock(&ailp->ail_lock);
812 xfs_trans_ail_cursor_done(&cur);
813 spin_unlock(&ailp->ail_lock);
814 }
815
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-08-10 14:19 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-09 23:03 [PATCH 0/9 v2] xfs: byte-base grant head reservation tracking Dave Chinner
2022-08-09 23:03 ` [PATCH 1/9] xfs: move and xfs_trans_committed_bulk Dave Chinner
2022-08-10 14:17 ` kernel test robot [this message]
2022-08-10 17:08 ` kernel test robot
2022-08-22 15:03 ` Darrick J. Wong
2022-09-07 13:51 ` Christoph Hellwig
2022-08-09 23:03 ` [PATCH 2/9] xfs: AIL doesn't need manual pushing Dave Chinner
2022-08-22 17:08 ` Darrick J. Wong
2022-08-23 1:51 ` Dave Chinner
2022-08-26 15:46 ` Darrick J. Wong
2022-09-07 14:01 ` Christoph Hellwig
2023-10-12 8:44 ` Christoph Hellwig
2022-08-09 23:03 ` [PATCH 3/9] xfs: background AIL push targets physical space, not grant space Dave Chinner
2022-08-22 19:00 ` Darrick J. Wong
2022-08-23 2:01 ` Dave Chinner
2022-08-26 15:47 ` Darrick J. Wong
2022-08-26 23:49 ` Darrick J. Wong
2022-09-07 14:04 ` Christoph Hellwig
2022-08-09 23:03 ` [PATCH 4/9] xfs: ensure log tail is always up to date Dave Chinner
2022-08-23 0:33 ` Darrick J. Wong
2022-08-23 2:18 ` Dave Chinner
2022-08-26 21:39 ` Darrick J. Wong
2022-08-26 23:49 ` Darrick J. Wong
2022-09-07 14:06 ` Christoph Hellwig
2022-08-09 23:03 ` [PATCH 5/9] xfs: l_last_sync_lsn is really AIL state Dave Chinner
2022-08-26 22:19 ` Darrick J. Wong
2022-09-07 14:11 ` Christoph Hellwig
2022-08-09 23:03 ` [PATCH 6/9] xfs: collapse xlog_state_set_callback in caller Dave Chinner
2022-08-26 22:20 ` Darrick J. Wong
2022-09-07 14:12 ` Christoph Hellwig
2022-08-09 23:03 ` [PATCH 7/9] xfs: track log space pinned by the AIL Dave Chinner
2022-08-26 22:39 ` Darrick J. Wong
2022-08-09 23:03 ` [PATCH 8/9] xfs: pass the full grant head to accounting functions Dave Chinner
2022-08-26 22:25 ` Darrick J. Wong
2022-08-09 23:03 ` [PATCH 9/9] xfs: grant heads track byte counts, not LSNs Dave Chinner
2022-08-26 23:45 ` Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2022-12-20 23:22 [PATCH 0/9 v3] xfs: byte-based grant head reservation tracking Dave Chinner
2022-12-20 23:23 ` [PATCH 1/9] xfs: move and xfs_trans_committed_bulk Dave Chinner
2023-09-21 1:48 [PATCH 0/9] xfs: byte-based grant head reservation tracking Dave Chinner
2023-09-21 1:48 ` [PATCH 1/9] xfs: move and xfs_trans_committed_bulk Dave Chinner
2023-10-12 8:54 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202208102203.TPVkxa2S-lkp@intel.com \
--to=lkp@intel.com \
--cc=david@fromorbit.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.