linux518: Remove merged/mitigated changes from misc-additions (#545)
This commit is contained in:
2
PKGBUILD
2
PKGBUILD
@@ -786,7 +786,7 @@ case $_basever in
|
||||
'9fad4a40449e09522899955762c8928ae17f4cdaa16e01239fd12592e9d58177'
|
||||
'a557b342111849a5f920bbe1c129f3ff1fc1eff62c6bd6685e0972fc88e39911'
|
||||
'766658d5ec9cf204635f735a8927854991d0133b2e34bdcd9ca36d7e34817e27'
|
||||
'7b487db1dda2e7b9fd2465118b4086cbe86efc695f70a4dce13c09fbe8e7f946'
|
||||
'428517fbcb161a640b53782000c16f797c2ad27cf2758e7e56133fc62d2d113b'
|
||||
'1b656ad96004f27e9dc63d7f430b50d5c48510d6d4cd595a81c24b21adb70313'
|
||||
'b0319a7dff9c48b2f3e3d3597ee154bf92223149a633a8b7ce4026252db86da6')
|
||||
;;
|
||||
|
@@ -132,107 +132,3 @@ index 2c7171e0b0010..85de313ddec29 100644
|
||||
select CPU_FREQ_GOV_PERFORMANCE
|
||||
help
|
||||
|
||||
https://lore.kernel.org/lkml/20210819004305.20203-1-deepak.sharma@amd.com/
|
||||
|
||||
From: Deepak Sharma <deepak.sharma@amd.com>
|
||||
To: <deepak.sharma@amd.com>
|
||||
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
|
||||
Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
|
||||
Thomas Gleixner <tglx@linutronix.de>,
|
||||
"Ingo Molnar" <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
|
||||
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
|
||||
<x86@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>,
|
||||
"open list:SUSPEND TO RAM" <linux-pm@vger.kernel.org>,
|
||||
"open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
|
||||
<linux-kernel@vger.kernel.org>
|
||||
Subject: [PATCH] x86/ACPI/State: Optimize C3 entry on AMD CPUs
|
||||
Date: Wed, 18 Aug 2021 17:43:05 -0700
|
||||
Message-ID: <20210819004305.20203-1-deepak.sharma@amd.com> (raw)
|
||||
|
||||
AMD CPU which support C3 shares cache. Its not necessary to flush the
|
||||
caches in software before entering C3. This will cause performance drop
|
||||
for the cores which share some caches. ARB_DIS is not used with current
|
||||
AMD C state implementation. So set related flags correctly.
|
||||
|
||||
Signed-off-by: Deepak Sharma <deepak.sharma@amd.com>
|
||||
---
|
||||
arch/x86/kernel/acpi/cstate.c | 15 +++++++++++++++
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c
|
||||
index 7de599eba7f0..62a5986d625a 100644
|
||||
--- a/arch/x86/kernel/acpi/cstate.c
|
||||
+++ b/arch/x86/kernel/acpi/cstate.c
|
||||
@@ -79,6 +79,21 @@ void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags,
|
||||
*/
|
||||
flags->bm_control = 0;
|
||||
}
|
||||
+ if (c->x86_vendor == X86_VENDOR_AMD) {
|
||||
+ /*
|
||||
+ * For all AMD CPUs that support C3, caches should not be
|
||||
+ * flushed by software while entering C3 type state. Set
|
||||
+ * bm->check to 1 so that kernel doesn't need to execute
|
||||
+ * cache flush operation.
|
||||
+ */
|
||||
+ flags->bm_check = 1;
|
||||
+ /*
|
||||
+ * In current AMD C state implementation ARB_DIS is no longer
|
||||
+ * used. So set bm_control to zero to indicate ARB_DIS is not
|
||||
+ * required while entering C3 type state.
|
||||
+ */
|
||||
+ flags->bm_control = 0;
|
||||
+ }
|
||||
}
|
||||
EXPORT_SYMBOL(acpi_processor_power_init_bm_check);
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
|
||||
index c549acb52ac4..a841abe6a071 100644
|
||||
--- a/fs/f2fs/namei.c
|
||||
+++ b/fs/f2fs/namei.c
|
||||
@@ -89,8 +89,6 @@ static struct inode *f2fs_new_inode(struct user_namespace *mnt_userns,
|
||||
if (test_opt(sbi, INLINE_XATTR))
|
||||
set_inode_flag(inode, FI_INLINE_XATTR);
|
||||
|
||||
- if (test_opt(sbi, INLINE_DATA) && f2fs_may_inline_data(inode))
|
||||
- set_inode_flag(inode, FI_INLINE_DATA);
|
||||
if (f2fs_may_inline_dentry(inode))
|
||||
set_inode_flag(inode, FI_INLINE_DENTRY);
|
||||
|
||||
@@ -107,10 +105,6 @@ static struct inode *f2fs_new_inode(struct user_namespace *mnt_userns,
|
||||
|
||||
f2fs_init_extent_tree(inode, NULL);
|
||||
|
||||
- stat_inc_inline_xattr(inode);
|
||||
- stat_inc_inline_inode(inode);
|
||||
- stat_inc_inline_dir(inode);
|
||||
-
|
||||
F2FS_I(inode)->i_flags =
|
||||
f2fs_mask_flags(mode, F2FS_I(dir)->i_flags & F2FS_FL_INHERITED);
|
||||
|
||||
@@ -127,6 +121,14 @@ static struct inode *f2fs_new_inode(struct user_namespace *mnt_userns,
|
||||
set_compress_context(inode);
|
||||
}
|
||||
|
||||
+ /* Should enable inline_data after compression set */
|
||||
+ if (test_opt(sbi, INLINE_DATA) && f2fs_may_inline_data(inode))
|
||||
+ set_inode_flag(inode, FI_INLINE_DATA);
|
||||
+
|
||||
+ stat_inc_inline_xattr(inode);
|
||||
+ stat_inc_inline_inode(inode);
|
||||
+ stat_inc_inline_dir(inode);
|
||||
+
|
||||
f2fs_set_inode_flags(inode);
|
||||
|
||||
trace_f2fs_new_inode(inode, 0);
|
||||
@@ -325,6 +327,8 @@ static void set_compress_inode(struct f2fs_sb_info *sbi, struct inode *inode,
|
||||
if (!is_extension_exist(name, ext[i], false))
|
||||
continue;
|
||||
|
||||
+ /* Do not use inline_data with compression */
|
||||
+ clear_inode_flag(inode, FI_INLINE_DATA);
|
||||
set_compress_context(inode);
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user