Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200217
b: refs/heads/master
c: c2f0e8c
h: refs/heads/master
i:
  200215: fef9f09
v: v3
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Jun 8, 2010
1 parent d9ee2c2 commit e7d72a3
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 35 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: d87815cb2090e07b0b0b2d73dc9740706e92c80c
refs/heads/master: c2f0e8c803ceba530060ec9bb9c74a06c2c3d833
2 changes: 1 addition & 1 deletion trunk/arch/s390/appldata/appldata_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ static int __init appldata_os_init(void)
goto out;
}

appldata_os_data = kzalloc(max_size, GFP_DMA);
appldata_os_data = kzalloc(max_size, GFP_KERNEL | GFP_DMA);
if (appldata_os_data == NULL) {
rc = -ENOMEM;
goto out;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/s390/kvm/kvm-s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ static int __init kvm_s390_init(void)
* to hold the maximum amount of facilites. On the other hand, we
* only set facilities that are known to work in KVM.
*/
facilities = (unsigned long long *) get_zeroed_page(GFP_DMA);
facilities = (unsigned long long *) get_zeroed_page(GFP_KERNEL|GFP_DMA);
if (!facilities) {
kvm_exit();
return -ENOMEM;
Expand Down
19 changes: 10 additions & 9 deletions trunk/arch/s390/mm/extmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static int
dcss_set_subcodes(void)
{
#ifdef CONFIG_64BIT
char *name = kmalloc(8 * sizeof(char), GFP_DMA);
char *name = kmalloc(8 * sizeof(char), GFP_KERNEL | GFP_DMA);
unsigned long rx, ry;
int rc;

Expand Down Expand Up @@ -252,12 +252,13 @@ dcss_diag_translate_rc (int vm_rc) {
static int
query_segment_type (struct dcss_segment *seg)
{
struct qin64 *qin = kmalloc (sizeof(struct qin64), GFP_DMA);
struct qout64 *qout = kmalloc (sizeof(struct qout64), GFP_DMA);

int diag_cc, rc, i;
unsigned long dummy, vmrc;
int diag_cc, rc, i;
struct qout64 *qout;
struct qin64 *qin;

qin = kmalloc(sizeof(*qin), GFP_KERNEL | GFP_DMA);
qout = kmalloc(sizeof(*qout), GFP_KERNEL | GFP_DMA);
if ((qin == NULL) || (qout == NULL)) {
rc = -ENOMEM;
goto out_free;
Expand Down Expand Up @@ -286,7 +287,7 @@ query_segment_type (struct dcss_segment *seg)
copy data for the new format. */
if (segext_scode == DCSS_SEGEXT) {
struct qout64_old *qout_old;
qout_old = kzalloc(sizeof(struct qout64_old), GFP_DMA);
qout_old = kzalloc(sizeof(*qout_old), GFP_KERNEL | GFP_DMA);
if (qout_old == NULL) {
rc = -ENOMEM;
goto out_free;
Expand Down Expand Up @@ -407,11 +408,11 @@ segment_overlaps_others (struct dcss_segment *seg)
static int
__segment_load (char *name, int do_nonshared, unsigned long *addr, unsigned long *end)
{
struct dcss_segment *seg = kmalloc(sizeof(struct dcss_segment),
GFP_DMA);
int rc, diag_cc;
unsigned long start_addr, end_addr, dummy;
struct dcss_segment *seg;
int rc, diag_cc;

seg = kmalloc(sizeof(*seg), GFP_KERNEL | GFP_DMA);
if (seg == NULL) {
rc = -ENOMEM;
goto out;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/input/misc/hp_sdc_rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ static const struct file_operations hp_sdc_rtc_fops = {
.llseek = no_llseek,
.read = hp_sdc_rtc_read,
.poll = hp_sdc_rtc_poll,
.unlocked_ioctl = hp_sdc_rtc_unlocked_ioctl,
.unlocked_ioctl = hp_sdc_rtc_ioctl,
.open = hp_sdc_rtc_open,
.fasync = hp_sdc_rtc_fasync,
};
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/s390/cio/itcw.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* size_t size;
*
* size = itcw_calc_size(1, 2, 0);
* buffer = kmalloc(size, GFP_DMA);
* buffer = kmalloc(size, GFP_KERNEL | GFP_DMA);
* if (!buffer)
* return -ENOMEM;
* itcw = itcw_init(buffer, size, ITCW_OP_READ, 1, 2, 0);
Expand Down
8 changes: 8 additions & 0 deletions trunk/fs/xfs/linux-2.6/xfs_aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1381,6 +1381,14 @@ xfs_vm_writepage(
if (!page_has_buffers(page))
create_empty_buffers(page, 1 << inode->i_blkbits, 0);


/*
* VM calculation for nr_to_write seems off. Bump it way
* up, this gets simple streaming writes zippy again.
* To be reviewed again after Jens' writeback changes.
*/
wbc->nr_to_write *= 4;

/*
* Convert delayed allocate, unwritten or unmapped space
* to real space and flush out to disk.
Expand Down
9 changes: 9 additions & 0 deletions trunk/include/linux/writeback.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ struct writeback_control {
unsigned for_reclaim:1; /* Invoked from the page allocator */
unsigned range_cyclic:1; /* range_start is cyclic */
unsigned more_io:1; /* more io to be dispatched */
/*
* write_cache_pages() won't update wbc->nr_to_write and
* mapping->writeback_index if no_nrwrite_index_update
* is set. write_cache_pages() may write more than we
* requested and we want to make sure nr_to_write and
* writeback_index are updated in a consistent manner
* so we use a single control to update them
*/
unsigned no_nrwrite_index_update:1;
};

/*
Expand Down
5 changes: 4 additions & 1 deletion trunk/include/trace/events/ext4.h
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ TRACE_EVENT(ext4_da_writepages_result,
__field( int, pages_written )
__field( long, pages_skipped )
__field( char, more_io )
__field( char, no_nrwrite_index_update )
__field( pgoff_t, writeback_index )
),

Expand All @@ -316,14 +317,16 @@ TRACE_EVENT(ext4_da_writepages_result,
__entry->pages_written = pages_written;
__entry->pages_skipped = wbc->pages_skipped;
__entry->more_io = wbc->more_io;
__entry->no_nrwrite_index_update = wbc->no_nrwrite_index_update;
__entry->writeback_index = inode->i_mapping->writeback_index;
),

TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld more_io %d writeback_index %lu",
TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld more_io %d no_nrwrite_index_update %d writeback_index %lu",
jbd2_dev_to_name(__entry->dev),
(unsigned long) __entry->ino, __entry->ret,
__entry->pages_written, __entry->pages_skipped,
__entry->more_io,
__entry->no_nrwrite_index_update,
(unsigned long) __entry->writeback_index)
);

Expand Down
30 changes: 10 additions & 20 deletions trunk/mm/page-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,7 @@ int write_cache_pages(struct address_space *mapping,
pgoff_t done_index;
int cycled;
int range_whole = 0;
long nr_to_write = wbc->nr_to_write;

pagevec_init(&pvec, 0);
if (wbc->range_cyclic) {
Expand All @@ -851,22 +852,7 @@ int write_cache_pages(struct address_space *mapping,
if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX)
range_whole = 1;
cycled = 1; /* ignore range_cyclic tests */

/*
* If this is a data integrity sync, cap the writeback to the
* current end of file. Any extension to the file that occurs
* after this is a new write and we don't need to write those
* pages out to fulfil our data integrity requirements. If we
* try to write them out, we can get stuck in this scan until
* the concurrent writer stops adding dirty pages and extending
* EOF.
*/
if (wbc->sync_mode == WB_SYNC_ALL &&
wbc->range_end == LLONG_MAX) {
end = i_size_read(mapping->host) >> PAGE_CACHE_SHIFT;
}
}

retry:
done_index = index;
while (!done && (index <= end)) {
Expand Down Expand Up @@ -949,10 +935,11 @@ int write_cache_pages(struct address_space *mapping,
done = 1;
break;
}
}
}

if (wbc->nr_to_write > 0) {
if (--wbc->nr_to_write == 0 &&
if (nr_to_write > 0) {
nr_to_write--;
if (nr_to_write == 0 &&
wbc->sync_mode == WB_SYNC_NONE) {
/*
* We stop writing back only if we are
Expand Down Expand Up @@ -983,8 +970,11 @@ int write_cache_pages(struct address_space *mapping,
end = writeback_index - 1;
goto retry;
}
if (wbc->range_cyclic || (range_whole && wbc->nr_to_write > 0))
mapping->writeback_index = done_index;
if (!wbc->no_nrwrite_index_update) {
if (wbc->range_cyclic || (range_whole && nr_to_write > 0))
mapping->writeback_index = done_index;
wbc->nr_to_write = nr_to_write;
}

return ret;
}
Expand Down

0 comments on commit e7d72a3

Please sign in to comment.