From owner-svn-src-all@freebsd.org Thu Feb 14 18:01:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 144CA14DC193; Thu, 14 Feb 2019 18:01:07 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A7ED48432E; Thu, 14 Feb 2019 18:01:06 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A893A837; Thu, 14 Feb 2019 18:01:06 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1EI16Qu006137; Thu, 14 Feb 2019 18:01:06 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1EI16rN006136; Thu, 14 Feb 2019 18:01:06 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201902141801.x1EI16rN006136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 14 Feb 2019 18:01:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r344131 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 344131 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A7ED48432E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2019 18:01:07 -0000 Author: asomers Date: Thu Feb 14 18:01:06 2019 New Revision: 344131 URL: https://svnweb.freebsd.org/changeset/base/344131 Log: MFC r340988: vfs_aio.c: rename "physio" symbols to "bio". aio has two paths: an asynchronous "physio" path and a synchronous path. Confusingly, physio(9) isn't actually used by the "physio" path, and never has been. In fact, it may even be called by the synchronous path! Rename the "physio" path to the "bio" path to reflect what it actually does: directly compose BIOs and send them to character devices. Modified: stable/12/sys/kern/vfs_aio.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/vfs_aio.c ============================================================================== --- stable/12/sys/kern/vfs_aio.c Thu Feb 14 17:40:38 2019 (r344130) +++ stable/12/sys/kern/vfs_aio.c Thu Feb 14 18:01:06 2019 (r344131) @@ -212,7 +212,7 @@ typedef struct oaiocb { /* * If the routine that services an AIO request blocks while running in an * AIO kernel process it can starve other I/O requests. BIO requests - * queued via aio_qphysio() complete in GEOM and do not use AIO kernel + * queued via aio_qbio() complete asynchronously and do not use AIO kernel * processes at all. Socket I/O requests use a separate pool of * kprocs and also force non-blocking I/O. Other file I/O requests * use the generic fo_read/fo_write operations which can block. The @@ -268,7 +268,7 @@ struct kaioinfo { int kaio_flags; /* (a) per process kaio flags */ int kaio_active_count; /* (c) number of currently used AIOs */ int kaio_count; /* (a) size of AIO queue */ - int kaio_buffer_count; /* (a) number of physio buffers */ + int kaio_buffer_count; /* (a) number of bio buffers */ TAILQ_HEAD(,kaiocb) kaio_all; /* (a) all AIOs in a process */ TAILQ_HEAD(,kaiocb) kaio_done; /* (a) done queue for process */ TAILQ_HEAD(,aioliojob) kaio_liojoblist; /* (a) list of lio jobs */ @@ -318,11 +318,11 @@ static int aio_newproc(int *); int aio_aqueue(struct thread *td, struct aiocb *ujob, struct aioliojob *lio, int type, struct aiocb_ops *ops); static int aio_queue_file(struct file *fp, struct kaiocb *job); -static void aio_physwakeup(struct bio *bp); +static void aio_biowakeup(struct bio *bp); static void aio_proc_rundown(void *arg, struct proc *p); static void aio_proc_rundown_exec(void *arg, struct proc *p, struct image_params *imgp); -static int aio_qphysio(struct proc *p, struct kaiocb *job); +static int aio_qbio(struct proc *p, struct kaiocb *job); static void aio_daemon(void *param); static void aio_bio_done_notify(struct proc *userp, struct kaiocb *job); static bool aio_clear_cancel_function_locked(struct kaiocb *job); @@ -741,9 +741,9 @@ drop: /* * The AIO processing activity for LIO_READ/LIO_WRITE. This is the code that - * does the I/O request for the non-physio version of the operations. The - * normal vn operations are used, and this code should work in all instances - * for every type of file, including pipes, sockets, fifos, and regular files. + * does the I/O request for the non-bio version of the operations. The normal + * vn operations are used, and this code should work in all instances for every + * type of file, including pipes, sockets, fifos, and regular files. * * XXX I don't think it works well for socket, pipe, and fifo. */ @@ -1195,7 +1195,7 @@ aio_newproc(int *start) } /* - * Try the high-performance, low-overhead physio method for eligible + * Try the high-performance, low-overhead bio method for eligible * VCHR devices. This method doesn't use an aio helper thread, and * thus has very low overhead. * @@ -1204,7 +1204,7 @@ aio_newproc(int *start) * duration of this call. */ static int -aio_qphysio(struct proc *p, struct kaiocb *job) +aio_qbio(struct proc *p, struct kaiocb *job) { struct aiocb *cb; struct file *fp; @@ -1277,7 +1277,7 @@ aio_qphysio(struct proc *p, struct kaiocb *job) bp->bio_length = cb->aio_nbytes; bp->bio_bcount = cb->aio_nbytes; - bp->bio_done = aio_physwakeup; + bp->bio_done = aio_biowakeup; bp->bio_data = (void *)(uintptr_t)cb->aio_buf; bp->bio_offset = cb->aio_offset; bp->bio_cmd = cb->aio_lio_opcode == LIO_WRITE ? BIO_WRITE : BIO_READ; @@ -1442,7 +1442,7 @@ static struct aiocb_ops aiocb_ops_osigevent = { #endif /* - * Queue a new AIO request. Choosing either the threaded or direct physio VCHR + * Queue a new AIO request. Choosing either the threaded or direct bio VCHR * technique is done in this code. */ int @@ -1697,7 +1697,7 @@ aio_queue_file(struct file *fp, struct kaiocb *job) bool safe; ki = job->userproc->p_aioinfo; - error = aio_qphysio(job->userproc, job); + error = aio_qbio(job->userproc, job); if (error >= 0) return (error); safe = false; @@ -1947,8 +1947,7 @@ sys_aio_suspend(struct thread *td, struct aio_suspend_ } /* - * aio_cancel cancels any non-physio aio operations not currently in - * progress. + * aio_cancel cancels any non-bio aio operations not currently in progress. */ int sys_aio_cancel(struct thread *td, struct aio_cancel_args *uap) @@ -2332,7 +2331,7 @@ sys_lio_listio(struct thread *td, struct lio_listio_ar } static void -aio_physwakeup(struct bio *bp) +aio_biowakeup(struct bio *bp) { struct kaiocb *job = (struct kaiocb *)bp->bio_caller1; struct proc *userp;