diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2020-05-02 22:39:26 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2020-05-02 22:39:26 +0000 |
commit | 0c1032665ca0b54ff2f8f7aefe5aae1cfef76c44 (patch) | |
tree | 66bf7ae0e46fdb756bf9b253b183f9f50e42fdba /sys/kern/kern_sendfile.c | |
parent | 4053f8ac4de7a978fe215f25e45469e512a2c7bb (diff) | |
download | src-0c1032665ca0b54ff2f8f7aefe5aae1cfef76c44.tar.gz src-0c1032665ca0b54ff2f8f7aefe5aae1cfef76c44.zip |
Continuation of multi page mbuf redesign from r359919.
The following series of patches addresses three things:
Now that array of pages is embedded into mbuf, we no longer need
separate structure to pass around, so struct mbuf_ext_pgs is an
artifact of the first implementation. And struct mbuf_ext_pgs_data
is a crutch to accomodate the main idea r359919 with minimal churn.
Also, M_EXT of type EXT_PGS are just a synonym of M_NOMAP.
The namespace for the newfeature is somewhat inconsistent and
sometimes has a lengthy prefixes. In these patches we will
gradually bring the namespace to "m_epg" prefix for all mbuf
fields and most functions.
Step 1 of 4:
o Anonymize mbuf_ext_pgs_data, embed in m_ext
o Embed mbuf_ext_pgs
o Start documenting all this entanglement
Reviewed by: gallatin
Differential Revision: https://reviews.freebsd.org/D24598
Notes
Notes:
svn path=/head/; revision=360569
Diffstat (limited to 'sys/kern/kern_sendfile.c')
-rw-r--r-- | sys/kern/kern_sendfile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c index 93029e765cfd..ed5be9cc0f8e 100644 --- a/sys/kern/kern_sendfile.c +++ b/sys/kern/kern_sendfile.c @@ -203,7 +203,7 @@ sendfile_free_mext_pg(struct mbuf *m) for (i = 0; i < ext_pgs->npgs; i++) { if (cache_last && i == ext_pgs->npgs - 1) flags = 0; - pg = PHYS_TO_VM_PAGE(ext_pgs->m_epg_pa[i]); + pg = PHYS_TO_VM_PAGE(m->m_epg_pa[i]); vm_page_release(pg, flags); } @@ -1046,11 +1046,11 @@ retry_space: ext_pgs->nrdy++; } - ext_pgs->m_epg_pa[ext_pgs_idx] = VM_PAGE_TO_PHYS(pga); + m0->m_epg_pa[ext_pgs_idx] = VM_PAGE_TO_PHYS(pga); ext_pgs->npgs++; xfs = xfsize(i, npages, off, space); ext_pgs->last_pg_len = xfs; - MBUF_EXT_PGS_ASSERT_SANITY(ext_pgs); + MBUF_EXT_PGS_ASSERT_SANITY(m0); mtail->m_len += xfs; mtail->m_ext.ext_size += PAGE_SIZE; continue; |