Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256630
b: refs/heads/master
c: 951cc93
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jul 22, 2011
1 parent 651a888 commit b533de2
Show file tree
Hide file tree
Showing 279 changed files with 15,198 additions and 9,068 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 415b3334a21aa67806c52d1acf4e72e14f7f402f
refs/heads/master: 951cc93a7493a81a47e20231441bc6cf17c98a37
28 changes: 0 additions & 28 deletions trunk/Documentation/filesystems/ubifs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,34 +111,6 @@ The following is an example of the kernel boot arguments to attach mtd0
to UBI and mount volume "rootfs":
ubi.mtd=0 root=ubi0:rootfs rootfstype=ubifs


Module Parameters for Debugging
===============================

When UBIFS has been compiled with debugging enabled, there are 2 module
parameters that are available to control aspects of testing and debugging.

debug_chks Selects extra checks that UBIFS can do while running:

Check Flag value

General checks 1
Check Tree Node Cache (TNC) 2
Check indexing tree size 4
Check orphan area 8
Check old indexing tree 16
Check LEB properties (lprops) 32
Check leaf nodes and inodes 64

debug_tsts Selects a mode of testing, as follows:

Test mode Flag value

Failure mode for recovery testing 4

For example, set debug_chks to 3 to enable general and TNC checks.


References
==========

Expand Down
2 changes: 2 additions & 0 deletions trunk/Documentation/mmc/00-INDEX
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ mmc-dev-attrs.txt
- info on SD and MMC device attributes
mmc-dev-parts.txt
- info on SD and MMC device partitions
mmc-async-req.txt
- info on mmc asynchronous requests
87 changes: 87 additions & 0 deletions trunk/Documentation/mmc/mmc-async-req.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
Rationale
=========

How significant is the cache maintenance overhead?
It depends. Fast eMMC and multiple cache levels with speculative cache
pre-fetch makes the cache overhead relatively significant. If the DMA
preparations for the next request are done in parallel with the current
transfer, the DMA preparation overhead would not affect the MMC performance.
The intention of non-blocking (asynchronous) MMC requests is to minimize the
time between when an MMC request ends and another MMC request begins.
Using mmc_wait_for_req(), the MMC controller is idle while dma_map_sg and
dma_unmap_sg are processing. Using non-blocking MMC requests makes it
possible to prepare the caches for next job in parallel with an active
MMC request.

MMC block driver
================

The mmc_blk_issue_rw_rq() in the MMC block driver is made non-blocking.
The increase in throughput is proportional to the time it takes to
prepare (major part of preparations are dma_map_sg() and dma_unmap_sg())
a request and how fast the memory is. The faster the MMC/SD is the
more significant the prepare request time becomes. Roughly the expected
performance gain is 5% for large writes and 10% on large reads on a L2 cache
platform. In power save mode, when clocks run on a lower frequency, the DMA
preparation may cost even more. As long as these slower preparations are run
in parallel with the transfer performance won't be affected.

Details on measurements from IOZone and mmc_test
================================================

https://wiki.linaro.org/WorkingGroups/Kernel/Specs/StoragePerfMMC-async-req

MMC core API extension
======================

There is one new public function mmc_start_req().
It starts a new MMC command request for a host. The function isn't
truly non-blocking. If there is an ongoing async request it waits
for completion of that request and starts the new one and returns. It
doesn't wait for the new request to complete. If there is no ongoing
request it starts the new request and returns immediately.

MMC host extensions
===================

There are two optional members in the mmc_host_ops -- pre_req() and
post_req() -- that the host driver may implement in order to move work
to before and after the actual mmc_host_ops.request() function is called.
In the DMA case pre_req() may do dma_map_sg() and prepare the DMA
descriptor, and post_req() runs the dma_unmap_sg().

Optimize for the first request
==============================

The first request in a series of requests can't be prepared in parallel
with the previous transfer, since there is no previous request.
The argument is_first_req in pre_req() indicates that there is no previous
request. The host driver may optimize for this scenario to minimize
the performance loss. A way to optimize for this is to split the current
request in two chunks, prepare the first chunk and start the request,
and finally prepare the second chunk and start the transfer.

Pseudocode to handle is_first_req scenario with minimal prepare overhead:

if (is_first_req && req->size > threshold)
/* start MMC transfer for the complete transfer size */
mmc_start_command(MMC_CMD_TRANSFER_FULL_SIZE);

/*
* Begin to prepare DMA while cmd is being processed by MMC.
* The first chunk of the request should take the same time
* to prepare as the "MMC process command time".
* If prepare time exceeds MMC cmd time
* the transfer is delayed, guesstimate max 4k as first chunk size.
*/
prepare_1st_chunk_for_dma(req);
/* flush pending desc to the DMAC (dmaengine.h) */
dma_issue_pending(req->dma_desc);

prepare_2nd_chunk_for_dma(req);
/*
* The second issue_pending should be called before MMC runs out
* of the first chunk. If the MMC runs out of the first data chunk
* before this call, the transfer is delayed.
*/
dma_issue_pending(req->dma_desc);
47 changes: 16 additions & 31 deletions trunk/Documentation/virtual/lguest/lguest.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#include <asm/bootparam.h>
#include "../../../include/linux/lguest_launcher.h"
/*L:110
* We can ignore the 42 include files we need for this program, but I do want
* We can ignore the 43 include files we need for this program, but I do want
* to draw attention to the use of kernel-style types.
*
* As Linus said, "C is a Spartan language, and so should your naming be." I
Expand All @@ -65,7 +65,6 @@ typedef uint16_t u16;
typedef uint8_t u8;
/*:*/

#define PAGE_PRESENT 0x7 /* Present, RW, Execute */
#define BRIDGE_PFX "bridge:"
#ifndef SIOCBRADDIF
#define SIOCBRADDIF 0x89a2 /* add interface to bridge */
Expand Down Expand Up @@ -861,8 +860,10 @@ static void console_output(struct virtqueue *vq)
/* writev can return a partial write, so we loop here. */
while (!iov_empty(iov, out)) {
int len = writev(STDOUT_FILENO, iov, out);
if (len <= 0)
err(1, "Write to stdout gave %i", len);
if (len <= 0) {
warn("Write to stdout gave %i (%d)", len, errno);
break;
}
iov_consume(iov, out, len);
}

Expand Down Expand Up @@ -898,7 +899,7 @@ static void net_output(struct virtqueue *vq)
* same format: what a coincidence!
*/
if (writev(net_info->tunfd, iov, out) < 0)
errx(1, "Write to tun failed?");
warnx("Write to tun failed (%d)?", errno);

/*
* Done with that one; wait_for_vq_desc() will send the interrupt if
Expand Down Expand Up @@ -955,7 +956,7 @@ static void net_input(struct virtqueue *vq)
*/
len = readv(net_info->tunfd, iov, in);
if (len <= 0)
err(1, "Failed to read from tun.");
warn("Failed to read from tun (%d).", errno);

/*
* Mark that packet buffer as used, but don't interrupt here. We want
Expand Down Expand Up @@ -1093,9 +1094,10 @@ static void update_device_status(struct device *dev)
warnx("Device %s configuration FAILED", dev->name);
if (dev->running)
reset_device(dev);
} else if (dev->desc->status & VIRTIO_CONFIG_S_DRIVER_OK) {
if (!dev->running)
start_device(dev);
} else {
if (dev->running)
err(1, "Device %s features finalized twice", dev->name);
start_device(dev);
}
}

Expand All @@ -1120,25 +1122,11 @@ static void handle_output(unsigned long addr)
return;
}

/*
* Devices *can* be used before status is set to DRIVER_OK.
* The original plan was that they would never do this: they
* would always finish setting up their status bits before
* actually touching the virtqueues. In practice, we allowed
* them to, and they do (eg. the disk probes for partition
* tables as part of initialization).
*
* If we see this, we start the device: once it's running, we
* expect the device to catch all the notifications.
*/
/* Devices should not be used before features are finalized. */
for (vq = i->vq; vq; vq = vq->next) {
if (addr != vq->config.pfn*getpagesize())
continue;
if (i->running)
errx(1, "Notification on running %s", i->name);
/* This just calls create_thread() for each virtqueue */
start_device(i);
return;
errx(1, "Notification on %s before setup!", i->name);
}
}

Expand Down Expand Up @@ -1370,7 +1358,7 @@ static void setup_console(void)
* --sharenet=<name> option which opens or creates a named pipe. This can be
* used to send packets to another guest in a 1:1 manner.
*
* More sopisticated is to use one of the tools developed for project like UML
* More sophisticated is to use one of the tools developed for project like UML
* to do networking.
*
* Faster is to do virtio bonding in kernel. Doing this 1:1 would be
Expand All @@ -1380,7 +1368,7 @@ static void setup_console(void)
* multiple inter-guest channels behind one interface, although it would
* require some manner of hotplugging new virtio channels.
*
* Finally, we could implement a virtio network switch in the kernel.
* Finally, we could use a virtio network switch in the kernel, ie. vhost.
:*/

static u32 str2ip(const char *ipaddr)
Expand Down Expand Up @@ -2017,10 +2005,7 @@ int main(int argc, char *argv[])
/* Tell the entry path not to try to reload segment registers. */
boot->hdr.loadflags |= KEEP_SEGMENTS;

/*
* We tell the kernel to initialize the Guest: this returns the open
* /dev/lguest file descriptor.
*/
/* We tell the kernel to initialize the Guest. */
tell_kernel(start);

/* Ensure that we terminate if a device-servicing child dies. */
Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/x86/boot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ Protocol: 2.10+

Field name: init_size
Type: read
Offset/size: 0x25c/4
Offset/size: 0x260/4

This field indicates the amount of linear contiguous memory starting
at the kernel runtime start address that the kernel needs before it
Expand Down
13 changes: 9 additions & 4 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@


List of maintainers and how to submit kernel changes

Please try to follow the guidelines below. This will make things
Expand Down Expand Up @@ -4584,9 +4585,8 @@ S: Maintained
F: drivers/mmc/host/omap.c

OMAP HS MMC SUPPORT
M: Madhusudhan Chikkature <madhu.cr@ti.com>
L: linux-omap@vger.kernel.org
S: Maintained
S: Orphan
F: drivers/mmc/host/omap_hsmmc.c

OMAP RANDOM NUMBER GENERATOR SUPPORT
Expand Down Expand Up @@ -6242,9 +6242,14 @@ F: drivers/char/toshiba.c
F: include/linux/toshiba.h

TMIO MMC DRIVER
M: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
M: Ian Molton <ian@mnementh.co.uk>
L: linux-mmc@vger.kernel.org
S: Maintained
F: drivers/mmc/host/tmio_mmc.*
F: drivers/mmc/host/tmio_mmc*
F: drivers/mmc/host/sh_mobile_sdhi.c
F: include/linux/mmc/tmio.h
F: include/linux/mmc/sh_mobile_sdhi.h

TMPFS (SHMEM FILESYSTEM)
M: Hugh Dickins <hughd@google.com>
Expand Down Expand Up @@ -6321,7 +6326,7 @@ F: drivers/scsi/u14-34f.c

UBI FILE SYSTEM (UBIFS)
M: Artem Bityutskiy <dedekind1@gmail.com>
M: Adrian Hunter <adrian.hunter@nokia.com>
M: Adrian Hunter <adrian.hunter@intel.com>
L: linux-mtd@lists.infradead.org
T: git git://git.infradead.org/ubifs-2.6.git
W: http://www.linux-mtd.infradead.org/doc/ubifs.html
Expand Down
2 changes: 1 addition & 1 deletion trunk/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION = 3
PATCHLEVEL = 0
SUBLEVEL = 0
EXTRAVERSION = -rc7
EXTRAVERSION =
NAME = Sneaky Weasel

# *DOCUMENTATION*
Expand Down
9 changes: 8 additions & 1 deletion trunk/arch/arm/configs/mmp2_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set
CONFIG_ARCH_MMP=y
CONFIG_MACH_BROWNSTONE=y
CONFIG_MACH_FLINT=y
CONFIG_MACH_MARVELL_JASPER=y
CONFIG_HIGH_RES_TIMERS=y
Expand Down Expand Up @@ -63,10 +64,16 @@ CONFIG_BACKLIGHT_MAX8925=y
# CONFIG_USB_SUPPORT is not set
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_MAX8925=y
CONFIG_MMC=y
# CONFIG_DNOTIFY is not set
CONFIG_INOTIFY=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_EXT2_FS=y
CONFIG_EXT3_FS=y
CONFIG_EXT4_FS=y
CONFIG_MSDOS_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_JFFS2_FS=y
CONFIG_CRAMFS=y
CONFIG_NFS_FS=y
Expand All @@ -81,7 +88,7 @@ CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_PREEMPT is not set
CONFIG_DEBUG_INFO=y
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
CONFIG_DYNAMIC_DEBUG=y
# CONFIG_DYNAMIC_DEBUG is not set
CONFIG_DEBUG_USER=y
CONFIG_DEBUG_ERRORS=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
Expand Down
10 changes: 9 additions & 1 deletion trunk/arch/arm/mach-mmp/brownstone.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,16 @@ static struct i2c_board_info brownstone_twsi1_info[] = {
};

static struct sdhci_pxa_platdata mmp2_sdh_platdata_mmc0 = {
.max_speed = 25000000,
.clk_delay_cycles = 0x1f,
};

static struct sdhci_pxa_platdata mmp2_sdh_platdata_mmc2 = {
.clk_delay_cycles = 0x1f,
.flags = PXA_FLAG_CARD_PERMANENT
| PXA_FLAG_SD_8_BIT_CAPABLE_SLOT,
};


static void __init brownstone_init(void)
{
mfp_config(ARRAY_AND_SIZE(brownstone_pin_config));
Expand All @@ -189,6 +196,7 @@ static void __init brownstone_init(void)
mmp2_add_uart(3);
mmp2_add_twsi(1, NULL, ARRAY_AND_SIZE(brownstone_twsi1_info));
mmp2_add_sdhost(0, &mmp2_sdh_platdata_mmc0); /* SD/MMC */
mmp2_add_sdhost(2, &mmp2_sdh_platdata_mmc2); /* eMMC */

/* enable 5v regulator */
platform_device_register(&brownstone_v_5vp_device);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-mmp/include/mach/mmp2.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef __ASM_MACH_MMP2_H
#define __ASM_MACH_MMP2_H

#include <plat/sdhci.h>
#include <linux/platform_data/pxa_sdhci.h>

struct sys_timer;

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-mmp/jasper.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static struct i2c_board_info jasper_twsi1_info[] = {
};

static struct sdhci_pxa_platdata mmp2_sdh_platdata_mmc0 = {
.max_speed = 25000000,
.clk_delay_cycles = 0x1f,
};

static void __init jasper_init(void)
Expand Down
Loading

0 comments on commit b533de2

Please sign in to comment.