Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
b8098f36
Commit
b8098f36
authored
Oct 22, 2019
by
Kent Overstreet
Committed by
Kent Overstreet
Oct 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bcachefs: Don't use rep movsq for small memcopies
Signed-off-by:
Kent Overstreet
<
kent.overstreet@linux.dev
>
parent
7f9473d1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
4 deletions
+22
-4
fs/bcachefs/bkey.h
fs/bcachefs/bkey.h
+2
-2
fs/bcachefs/extents.c
fs/bcachefs/extents.c
+2
-2
fs/bcachefs/util.h
fs/bcachefs/util.h
+18
-0
No files found.
fs/bcachefs/bkey.h
View file @
b8098f36
...
...
@@ -95,7 +95,7 @@ do { \
(u64 *) (_dst) < (u64 *) (_src) + \
((struct bkey *) (_src))->u64s); \
\
__memmove_u64s_down
((_dst), (_src), \
memcpy_u64s_small
((_dst), (_src), \
((struct bkey *) (_src))->u64s); \
} while (0)
...
...
fs/bcachefs/extents.c
View file @
b8098f36
...
...
@@ -1457,7 +1457,7 @@ static inline void __extent_entry_insert(struct bkey_i *k,
{
union
bch_extent_entry
*
end
=
bkey_val_end
(
bkey_i_to_s
(
k
));
memmove_u64s_up
((
u64
*
)
dst
+
extent_entry_u64s
(
new
),
memmove_u64s_up
_small
((
u64
*
)
dst
+
extent_entry_u64s
(
new
),
dst
,
(
u64
*
)
end
-
(
u64
*
)
dst
);
k
->
k
.
u64s
+=
extent_entry_u64s
(
new
);
memcpy_u64s_small
(
dst
,
new
,
extent_entry_u64s
(
new
));
...
...
fs/bcachefs/util.h
View file @
b8098f36
...
...
@@ -593,6 +593,24 @@ static inline void memmove_u64s_down(void *dst, const void *src,
__memmove_u64s_down
(
dst
,
src
,
u64s
);
}
static
inline
void
__memmove_u64s_up_small
(
void
*
_dst
,
const
void
*
_src
,
unsigned
u64s
)
{
u64
*
dst
=
(
u64
*
)
_dst
+
u64s
;
u64
*
src
=
(
u64
*
)
_src
+
u64s
;
while
(
u64s
--
)
*--
dst
=
*--
src
;
}
static
inline
void
memmove_u64s_up_small
(
void
*
dst
,
const
void
*
src
,
unsigned
u64s
)
{
EBUG_ON
(
dst
<
src
);
__memmove_u64s_up_small
(
dst
,
src
,
u64s
);
}
static
inline
void
__memmove_u64s_up
(
void
*
_dst
,
const
void
*
_src
,
unsigned
u64s
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment